Exemple #1
0
        public void TestEnsureIndexAfterDropCollection()
        {
            if (collection.Exists())
            {
                collection.Drop();
            }
            server.ResetIndexCache();

            Assert.IsFalse(collection.IndexExists("x"));
            collection.EnsureIndex("x");
            Assert.IsTrue(collection.IndexExists("x"));

            collection.Drop();
            Assert.IsFalse(collection.IndexExists("x"));
            collection.EnsureIndex("x");
            Assert.IsTrue(collection.IndexExists("x"));
        }
Exemple #2
0
 public void ResetIndexCache()
 {
     _mongoServer.ResetIndexCache();
 }