public void TestClassWithBsonDateTimeId() { _collection.RemoveAll(); var doc = new ClassWithBsonDateTimeId { Id = null, X = 1 }; _collection.Insert(doc); doc = new ClassWithBsonDateTimeId { Id = BsonDateTime.Create(DateTime.MinValue), X = 1 }; _collection.Insert(doc); doc = new ClassWithBsonDateTimeId { Id = BsonDateTime.Create(DateTime.UtcNow), X = 1 }; _collection.Insert(doc); doc = new ClassWithBsonDateTimeId { Id = BsonDateTime.Create(DateTime.MaxValue), X = 1 }; _collection.Insert(doc); }
public void TestClassWithBsonDateTimeId() { _collection.RemoveAll(); var doc = new ClassWithBsonDateTimeId { Id = null, X = 1 }; _collection.Insert(doc); doc = new ClassWithBsonDateTimeId { Id = new BsonDateTime(DateTime.MinValue), X = 1 }; _collection.Insert(doc); doc = new ClassWithBsonDateTimeId { Id = new BsonDateTime(DateTime.UtcNow), X = 1 }; _collection.Insert(doc); doc = new ClassWithBsonDateTimeId { Id = new BsonDateTime(DateTime.MaxValue), X = 1 }; _collection.Insert(doc); }