Skip to content

Commit 56351e8

Browse files
authored
CSHARP-5710: Fix RangeExplicitEncryptionTest definition (#1761)
1 parent 5439ed7 commit 56351e8

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

tests/MongoDB.Bson.Tests/Serialization/Serializers/DateOnlySerializerTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,8 @@ public void Serializer_should_be_registered()
342342
[Theory]
343343
[ParameterAttributeData]
344344
public void WithRepresentation_should_return_expected_result(
345-
[Values(BsonType.Document, BsonType.DateTime, BsonType.Document, BsonType.String)] BsonType oldRepresentation,
346-
[Values(BsonType.Document, BsonType.DateTime, BsonType.Document, BsonType.String)] BsonType newRepresentation)
345+
[Values(BsonType.Document, BsonType.DateTime, BsonType.String)] BsonType oldRepresentation,
346+
[Values(BsonType.Document, BsonType.DateTime, BsonType.String)] BsonType newRepresentation)
347347
{
348348
var subject = new DateOnlySerializer(oldRepresentation);
349349

@@ -375,4 +375,4 @@ private class TestClass
375375
}
376376
}
377377
#endif
378-
}
378+
}

tests/MongoDB.Bson.Tests/Serialization/Serializers/TimeOnlySerializerTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void Constructor_with_representation_should_return_expected_result(
7272
[Values(BsonType.String, BsonType.Int64, BsonType.Int32, BsonType.Double)]
7373
BsonType representation,
7474
[Values(TimeOnlyUnits.Ticks, TimeOnlyUnits.Hours, TimeOnlyUnits.Minutes, TimeOnlyUnits.Seconds,
75-
TimeOnlyUnits.Milliseconds, TimeOnlyUnits.Microseconds, TimeOnlyUnits.Ticks, TimeOnlyUnits.Nanoseconds)]
75+
TimeOnlyUnits.Milliseconds, TimeOnlyUnits.Microseconds, TimeOnlyUnits.Nanoseconds)]
7676
TimeOnlyUnits units)
7777
{
7878
var subject = new TimeOnlySerializer(representation, units);
@@ -476,4 +476,4 @@ private class TestClass
476476
}
477477
}
478478
#endif
479-
}
479+
}

tests/MongoDB.Driver.Tests/Core/Operations/DistinctOperationTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public void MaxTime_set_should_throw_when_value_is_invalid(
153153
[Theory]
154154
[ParameterAttributeData]
155155
public void ReadConcern_get_and_set_should_work(
156-
[Values(null, ReadConcernLevel.Local, ReadConcernLevel.Local)]
156+
[Values(null, ReadConcernLevel.Local)]
157157
ReadConcernLevel? level)
158158
{
159159
var subject = new DistinctOperation<int>(_collectionNamespace, _valueSerializer, _fieldName, _messageEncoderSettings);

tests/MongoDB.Driver.Tests/Specifications/client-side-encryption/prose-tests/ClientEncryptionProseTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2184,7 +2184,7 @@ public async Task RangeExplicitEncryptionTest(
21842184
[Range(1, 8)] int testCase,
21852185
// test case rangeType values correspond to keys used in test configuration files
21862186
[Values("DecimalNoPrecision", "DecimalPrecision", "DoubleNoPrecision", "DoublePrecision", "Date", "Int", "Long")] string rangeType,
2187-
[Values(false, false)] bool async)
2187+
[Values(true, false)] bool async)
21882188
{
21892189
// CSHARP-4606: Skip all fle2v2 tests on Mac until https://jira.mongodb.org/browse/SERVER-69563 propagates to EG Macs.
21902190
RequirePlatform.Check().SkipWhen(SupportedOperatingSystem.MacOS);

tests/MongoDB.TestHelpers/XunitExtensions/ValuesAttribute.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ public ValuesAttribute(params object[] values)
3030

3131
public object[] GenerateValues()
3232
{
33+
if (_values.Distinct().Count() != _values.Length)
34+
{
35+
throw new InvalidOperationException();
36+
}
37+
3338
return _values;
3439
}
3540
}

0 commit comments

Comments
 (0)