MongoDB.DriverUnitTests.MongoCollectionTests.TestDropIndex C# (CSharp) Метод

TestDropIndex() приватный Метод

private TestDropIndex ( ) : void
Результат void
        public void TestDropIndex()
        {
            _collection.DropAllIndexes();
            Assert.AreEqual(1, _collection.GetIndexes().Count());
            Assert.Throws<MongoCommandException>(() => _collection.DropIndex("x"));

            _collection.CreateIndex("x");
            Assert.AreEqual(2, _collection.GetIndexes().Count());
            _collection.DropIndex("x");
            Assert.AreEqual(1, _collection.GetIndexes().Count());
        }