File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
src/MongoDB.Driver.Tests/Communication/Security Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -44,13 +44,12 @@ public void TestNoCredentials()
4444 _settings . Credentials = Enumerable . Empty < MongoCredential > ( ) ;
4545 var client = new MongoClient ( _settings ) ;
4646
47- Assert . Throws < MongoQueryException > ( ( ) =>
47+ Assert . Throws < MongoCommandException > ( ( ) =>
4848 {
4949 client
5050 . GetDatabase ( DriverTestConfiguration . DatabaseNamespace . DatabaseName )
5151 . GetCollection < BsonDocument > ( __collectionName )
52- . FindSync ( new BsonDocument ( ) )
53- . ToList ( ) ;
52+ . Count ( new BsonDocument ( ) ) ;
5453 } ) ;
5554 }
5655
Original file line number Diff line number Diff line change @@ -43,13 +43,12 @@ public void TestNoCredentials()
4343 _settings . Credentials = Enumerable . Empty < MongoCredential > ( ) ;
4444 var client = new MongoClient ( _settings ) ;
4545
46- Assert . Throws < MongoQueryException > ( ( ) =>
46+ Assert . Throws < MongoCommandException > ( ( ) =>
4747 {
4848 client
4949 . GetDatabase ( DriverTestConfiguration . DatabaseNamespace . DatabaseName )
5050 . GetCollection < BsonDocument > ( __collectionName )
51- . FindSync ( new BsonDocument ( ) )
52- . ToList ( ) ;
51+ . Count ( new BsonDocument ( ) ) ;
5352 } ) ;
5453 }
5554
You can’t perform that action at this time.
0 commit comments