MongoDB.DriverUnitTests.MongoCollectionTests.TestCreateCollectionSetCappedSetMaxSize C# (CSharp) Method

TestCreateCollectionSetCappedSetMaxSize() private method

private TestCreateCollectionSetCappedSetMaxSize ( ) : void
return void
        public void TestCreateCollectionSetCappedSetMaxSize()
        {
            var collection = _database.GetCollection("cappedcollection");
            collection.Drop();
            Assert.IsFalse(collection.Exists());
            var options = CollectionOptions.SetCapped(true).SetMaxSize(10000000);
            _database.CreateCollection(collection.Name, options);
            Assert.IsTrue(collection.Exists());
            var stats = collection.GetStats();
            Assert.IsTrue(stats.IsCapped);
            Assert.IsTrue(stats.StorageSize >= 10000000);
            collection.Drop();
        }