File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
src/MongoDB.Driver.Core/Core/Misc
tests/MongoDB.Driver.Tests/Linq/Linq3ImplementationTests/Jira Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ public class Feature
6969 private static readonly Feature __findAndModifyWriteConcern = new Feature ( "FindAndModifyWriteConcern" , WireVersion . Server32 ) ;
7070 private static readonly Feature __findCommand = new Feature ( "FindCommand" , WireVersion . Server32 ) ;
7171 private static readonly Feature __geoNearCommand = new Feature ( "GeoNearCommand" , WireVersion . Zero , WireVersion . Server42 ) ;
72+ private static readonly Feature __getField = new Feature ( "GetField" , WireVersion . Server50 ) ;
7273 private static readonly Feature __getMoreComment = new Feature ( "GetMoreComment" , WireVersion . Server44 ) ;
7374 private static readonly Feature __groupCommand = new Feature ( "GroupCommand" , WireVersion . Zero , WireVersion . Server42 ) ;
7475 private static readonly Feature __hedgedReads = new Feature ( "HedgedReads" , WireVersion . Server44 ) ;
@@ -369,6 +370,11 @@ public class Feature
369370 /// </summary>
370371 public static Feature GeoNearCommand => __geoNearCommand ;
371372
373+ /// <summary>
374+ /// Gets the getField feature.
375+ /// </summary>
376+ public static Feature GetField => __getField ;
377+
372378 /// <summary>
373379 /// Gets the getMore comment feature.
374380 /// </summary>
Original file line number Diff line number Diff line change 1616using System . Linq ;
1717using FluentAssertions ;
1818using MongoDB . Bson ;
19+ using MongoDB . Driver . Core . Misc ;
20+ using MongoDB . Driver . Core . TestHelpers . XunitExtensions ;
1921using Xunit ;
2022
2123namespace MongoDB . Driver . Tests . Linq . Linq3ImplementationTests . Jira
@@ -48,6 +50,8 @@ public void Should_not_use_getField(string fieldName)
4850 [ InlineData ( "a." ) ]
4951 public void Should_use_getField ( string fieldName )
5052 {
53+ RequireServer . Check ( ) . Supports ( Feature . GetField ) ;
54+
5155 var collection = GetCollection < BsonDocument > ( ) ;
5256 CreateCollection ( collection , new BsonDocument ( fieldName , 123 ) ) ;
5357 var queryable = collection . AsQueryable ( )
@@ -67,6 +71,8 @@ public void Should_use_getField(string fieldName)
6771 [ InlineData ( "$a$" ) ]
6872 public void Should_use_getField_with_literal ( string fieldName )
6973 {
74+ RequireServer . Check ( ) . Supports ( Feature . GetField ) ;
75+
7076 var collection = GetCollection < BsonDocument > ( ) ;
7177 CreateCollection ( collection , new BsonDocument ( fieldName , 123 ) ) ;
7278 var queryable = collection . AsQueryable ( )
You can’t perform that action at this time.
0 commit comments