Skip to content

Commit

Permalink
Fixed bad exception assertion after changing server versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
craiggwilson committed May 10, 2016
1 parent 1a6f08f commit d138493
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ public void TestNoCredentials()
_settings.Credentials = Enumerable.Empty<MongoCredential>();
var client = new MongoClient(_settings);

Assert.Throws<MongoQueryException>(() =>
Assert.Throws<MongoCommandException>(() =>
{
client
.GetDatabase(DriverTestConfiguration.DatabaseNamespace.DatabaseName)
.GetCollection<BsonDocument>(__collectionName)
.FindSync(new BsonDocument())
.ToList();
.Count(new BsonDocument());
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,12 @@ public void TestNoCredentials()
_settings.Credentials = Enumerable.Empty<MongoCredential>();
var client = new MongoClient(_settings);

Assert.Throws<MongoQueryException>(() =>
Assert.Throws<MongoCommandException>(() =>
{
client
.GetDatabase(DriverTestConfiguration.DatabaseNamespace.DatabaseName)
.GetCollection<BsonDocument>(__collectionName)
.FindSync(new BsonDocument())
.ToList();
.Count(new BsonDocument());
});
}

Expand Down

0 comments on commit d138493

Please sign in to comment.