public void TestSetAutoIndexIdTrue() { var options = CollectionOptions.SetAutoIndexId(true); var expected = "{ 'autoIndexId' : true }".Replace("'", "\""); Assert.AreEqual(expected, options.ToJson()); }
public void TestSetAutoIndexIdFalse() { var options = CollectionOptions.SetAutoIndexId(false); var expected = "{ 'autoIndexId' : false }".Replace("'", "\""); Assert.Equal(expected, options.ToJson()); }
public void TestSetAutoIndexIdFalse() { var options = CollectionOptions.SetAutoIndexId(false); var expected = "{ }"; Assert.AreEqual(expected, options.ToJson()); }
public void TestSetAutoIndexIdTrue() { #pragma warning disable 618 var options = CollectionOptions.SetAutoIndexId(true); #pragma warning restore var expected = "{ 'autoIndexId' : true }".Replace("'", "\""); Assert.Equal(expected, options.ToJson()); }
public void TestSetAll() { var options = CollectionOptions .SetAutoIndexId(true) .SetCapped(true) .SetMaxDocuments(100) .SetMaxSize(2000); var expected = "{ 'autoIndexId' : true, 'capped' : true, 'max' : NumberLong(100), 'size' : NumberLong(2000) }".Replace("'", "\""); Assert.AreEqual(expected, options.ToJson()); }