@@ -39,6 +39,7 @@ public void SerializerFinder_should_resolve_string_methods(LambdaExpression expr
3939 serializerMap . GetSerializer ( expression . Body ) . Should ( ) . BeOfType ( expectedSerializerType ) ;
4040 }
4141
42+ #if NETSTANDARD2_1_OR_GREATER || NET6_0_OR_GREATER
4243 [ Theory ]
4344 [ MemberData ( nameof ( NotSupportedTestCases ) ) ]
4445 public void SerializerFinder_should_throw_for_unsupported_string_methods ( LambdaExpression expression , Type expectedSerializerType )
@@ -52,6 +53,7 @@ public void SerializerFinder_should_throw_for_unsupported_string_methods(LambdaE
5253 var exception = Record . Exception ( ( ) => serializerMap . GetSerializer ( expression . Body ) ) ;
5354 exception . Should ( ) . BeOfType < ExpressionNotSupportedException > ( ) ;
5455 }
56+ #endif
5557
5658 public static readonly object [ ] [ ] SupportedTestCases =
5759 [
@@ -133,18 +135,17 @@ public void SerializerFinder_should_throw_for_unsupported_string_methods(LambdaE
133135 [ TestHelpers . MakeLambda ( ( MyModel model ) => model . Name . TrimEnd ( new char [ ] { ' ' } ) ) , typeof ( StringSerializer ) ] ,
134136 ] ;
135137
138+ #if NETSTANDARD2_1_OR_GREATER || NET6_0_OR_GREATER
136139 public static readonly object [ ] [ ] NotSupportedTestCases =
137140 [
138- // TODO CSHARP-5979 Make these tests supported once we support parameterless and single char overloads of Trim, TrimStart and TrimEnd.
139- #if NETSTANDARD2_1_OR_GREATER || NET6_0_OR_GREATER
140-
141+ // Not supported yet, see https://jira.mongodb.org/browse/CSHARP-5979
141142 [ TestHelpers . MakeLambda ( ( MyModel model ) => model . Name . Trim ( ' ' ) ) , typeof ( StringSerializer ) ] ,
142143 [ TestHelpers . MakeLambda ( ( MyModel model ) => model . Name . TrimStart ( ' ' ) ) , typeof ( StringSerializer ) ] ,
143144 [ TestHelpers . MakeLambda ( ( MyModel model ) => model . Name . TrimEnd ( ) ) , typeof ( StringSerializer ) ] ,
144145 [ TestHelpers . MakeLambda ( ( MyModel model ) => model . Name . TrimStart ( ) ) , typeof ( StringSerializer ) ] ,
145146 [ TestHelpers . MakeLambda ( ( MyModel model ) => model . Name . TrimEnd ( ) ) , typeof ( StringSerializer ) ] ,
146- #endif
147147 ] ;
148+ #endif
148149
149150 private class MyModel
150151 {
0 commit comments