示例#1
0
        public void GetCollection_ReturnsValidCollection()
        {
            // arrange
            string dbName         = "db name",
                   collectionName = "collection name";

            _provider = new MongoDbProvider(_connStr, _mockMongo);
            _provider.Init(dbName);


            // act
            var collection = _provider.GetCollection <BsonDocument>(collectionName);

            // assert
            Assert.IsNotNull(collection);
            Assert.AreEqual(collectionName, collection.CollectionNamespace.CollectionName);
        }