diff --git a/tests/MongoDB.Driver.Legacy.Tests/Builders/IndexKeysBuilderTests.cs b/tests/MongoDB.Driver.Legacy.Tests/Builders/IndexKeysBuilderTests.cs index 89a1a36136d..85977478eba 100644 --- a/tests/MongoDB.Driver.Legacy.Tests/Builders/IndexKeysBuilderTests.cs +++ b/tests/MongoDB.Driver.Legacy.Tests/Builders/IndexKeysBuilderTests.cs @@ -70,15 +70,7 @@ public void CreateIndex_with_wildcardProjection_should_create_expected_index() var index = indexes.RawDocuments.Single(i => i["name"].AsString == "custom"); index["key"]["$**"].AsInt32.Should().Be(1); - var serverVersion = CoreTestConfiguration.ServerVersion; - if (serverVersion >= new SemanticVersion(4, 5, 0, "") && serverVersion <= new SemanticVersion(6, 2, 0, "")) - { - index["wildcardProjection"].Should().Be(BsonDocument.Parse("{ _id : true }")); - } - else - { - index["wildcardProjection"].Should().Be(BsonDocument.Parse("{ _id : 1 }")); - } + index["wildcardProjection"].Should().Be(BsonDocument.Parse("{ _id : 1 }")); } [Fact] diff --git a/tests/MongoDB.Driver.Legacy.Tests/Builders/IndexKeysBuilderTypedTests.cs b/tests/MongoDB.Driver.Legacy.Tests/Builders/IndexKeysBuilderTypedTests.cs index 02290882c7a..b7f653c65e9 100644 --- a/tests/MongoDB.Driver.Legacy.Tests/Builders/IndexKeysBuilderTypedTests.cs +++ b/tests/MongoDB.Driver.Legacy.Tests/Builders/IndexKeysBuilderTypedTests.cs @@ -89,15 +89,7 @@ public void CreateIndex_with_wildcardProjection_should_create_expected_index() var indexes = collection.GetIndexes(); var index = indexes.RawDocuments.Single(i => i["name"].AsString == "custom"); index["key"]["$**"].AsInt32.Should().Be(1); - var serverVersion = CoreTestConfiguration.ServerVersion; - if (serverVersion >= new SemanticVersion(4, 5, 0, "") && serverVersion <= new SemanticVersion(6, 2, 0, "")) - { - index["wildcardProjection"].Should().Be(BsonDocument.Parse("{ b : true, _id : false }")); - } - else - { - index["wildcardProjection"].Should().Be(BsonDocument.Parse("{ b : 1, _id : 0 }")); - } + index["wildcardProjection"].Should().Be(BsonDocument.Parse("{ b : 1, _id : 0 }")); } [Fact]