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 c94dc1b commit 898adcd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
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
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 898adcd

Please sign in to comment.