public void ExistsUniqueItem_OnlySelf_ReturnNull() { var repository = new MongoRepository<TestModel>(); repository.Drop(); var item = new TestModel { StringValue = "sinan" }; var item2 = new TestModel { StringValue = "sinan" }; repository.Insert(item); var result = repository.ExistsUniqueItem(item2); Assert.IsTrue(result); }
public static TestModel CreateInstance() { var item = new TestModel { StringValue = "test", StringValue2 = "test2", IntValue = 1, LongValue = 4294967296L, DoubleValue = 1.7E+3, // 1700 FloatValue = 4.5f, DecimalValue = 120m, DateTimeValue = DateTime.Now, BoolValue = true, CharValue = 'S', ByteValue = 255 }; return item; }