@@ -26,9 +26,6 @@ namespace MongoDB.Driver.Core.Authentication
26
26
/// </summary>
27
27
public class SaslPrepHelperTests
28
28
{
29
- // Currently, we only support SaslPrep in .NET Framework due to a lack of a string normalization function in
30
- // .NET Standard
31
- #if NET452
32
29
[ Fact ]
33
30
public void SaslPrepQuery_accepts_undefined_codepoint ( )
34
31
{
@@ -52,6 +49,8 @@ public void SaslPrepStored_maps_space_equivalents_to_space(string expected, stri
52
49
SaslPrepHelper . SaslPrepStored ( input ) . Should ( ) . Be ( expected ) ;
53
50
}
54
51
52
+ #if ! NETCOREAPP1_1
53
+ // Normalization is not supported in netstandard 1.5 due to a lack of a string normalization function.
55
54
[ Theory ]
56
55
[ ParameterAttributeData ]
57
56
[ InlineData ( "IX" , "\u2168 " ) ] // "IX", Roman numeral nine
@@ -62,6 +61,7 @@ public void SaslPrepStored_returns_expected_output_when_passed_nonNormalized_str
62
61
{
63
62
SaslPrepHelper . SaslPrepStored ( nonNormalizedStr ) . Should ( ) . Be ( expected ) ;
64
63
}
64
+ #endif
65
65
66
66
[ Theory ]
67
67
[ ParameterAttributeData ]
@@ -80,8 +80,11 @@ public void SaslPrepStored_returns_expected_output_when_passed_partially_SaslPre
80
80
[ InlineData ( "user" , "user" ) ]
81
81
[ InlineData ( "user=" , "user=" ) ]
82
82
[ InlineData ( "USER" , "USER" ) ]
83
+ #if ! NETCOREAPP1_1
84
+ // Normalization is not supported in netstandard 1.5 due to a lack of a string normalization function.
83
85
[ InlineData ( "a" , "\u00AA " ) ]
84
86
[ InlineData ( "IX" , "\u2168 " ) ]
87
+ #endif
85
88
public void SaslPrepStored_returns_expected_output_when_passed_Rfc4013_examples ( string expected , string input )
86
89
{
87
90
SaslPrepHelper . SaslPrepStored ( input ) . Should ( ) . Be ( expected ) ;
@@ -117,7 +120,6 @@ public void SaslPrepStored_throws_exception_when_passed_an_undefined_codepoint()
117
120
exception . Should ( ) . BeOfType < ArgumentException > ( ) ;
118
121
exception . Message . Should ( ) . Be ( "Character at position 3 is unassigned" ) ;
119
122
}
120
- #endif
121
123
122
124
private static readonly Lazy < int > _unassignedCodePoint = new Lazy < int > ( FindUnassignedCodePoint ) ;
123
125
0 commit comments