public void TestClassWithBsonTimestampId() { _collection.RemoveAll(); var doc = new ClassWithBsonTimestampId { Id = null, X = 1 }; _collection.Insert(doc); Assert.IsNull(doc.Id); doc = new ClassWithBsonTimestampId { Id = new BsonTimestamp(1, 2), X = 1 }; _collection.Insert(doc); }
public void TestClassWithBsonTimestampId() { _collection.RemoveAll(); var doc = new ClassWithBsonTimestampId { Id = null, X = 1 }; _collection.Insert(doc); Assert.IsNull(doc.Id); doc = new ClassWithBsonTimestampId { Id = BsonTimestamp.Create(0, 0), X = 1 }; _collection.Insert(doc); Assert.AreEqual(BsonTimestamp.Create(0, 0), doc.Id); doc = new ClassWithBsonTimestampId { Id = BsonTimestamp.Create(1, 2), X = 1 }; _collection.Insert(doc); }
public void TestClassWithBsonTimestampId() { _collection.RemoveAll(); var doc = new ClassWithBsonTimestampId { Id = null, X = 1 }; _collection.Insert(doc); Assert.Null(doc.Id); doc = new ClassWithBsonTimestampId { Id = new BsonTimestamp(1, 2), X = 1 }; _collection.Insert(doc); }
public void TestClassWithBsonTimestampId() { collection.RemoveAll(); var doc = new ClassWithBsonTimestampId { Id = null, X = 1 }; collection.Insert(doc); Assert.IsNull(doc.Id); doc = new ClassWithBsonTimestampId { Id = BsonTimestamp.Create(0, 0), X = 1 }; collection.Insert(doc); Assert.AreEqual(BsonTimestamp.Create(0, 0), doc.Id); doc = new ClassWithBsonTimestampId { Id = BsonTimestamp.Create(1, 2), X = 1 }; collection.Insert(doc); }