public void TestClassWithStringId() { _collection.RemoveAll(); var doc = new ClassWithStringId { Id = null, X = 1 }; _collection.Insert(doc); Assert.IsNull(doc.Id); doc = new ClassWithStringId { Id = "", X = 1 }; _collection.Insert(doc); Assert.AreEqual("", doc.Id); doc = new ClassWithStringId { Id = "123", X = 1 }; _collection.Insert(doc); }
public void TestClassWithStringId() { _collection.RemoveAll(); var doc = new ClassWithStringId { Id = null, X = 1 }; _collection.Insert(doc); Assert.Null(doc.Id); doc = new ClassWithStringId { Id = "", X = 1 }; _collection.Insert(doc); Assert.Equal("", doc.Id); doc = new ClassWithStringId { Id = "123", X = 1 }; _collection.Insert(doc); }