public void GeWithNot_ReturnsProperSql() { var pred = new PropertyPredicate <PredicateTestEntity, PredicateTestEntity2> { PropertyName = "Id", PropertyName2 = "Key", Not = true, Operator = Operator.Ge }; Dictionary <string, object> parameters = new Dictionary <string, object>(); string result = pred.GetSql(parameters); Assert.AreEqual("([PredicateTestEntity].[Id] < [PredicateTestEntity2].[Key])", result); Assert.AreEqual(0, parameters.Count); }
public void Lt_ReturnsProperSql() { var pred = new PropertyPredicate<PredicateTestEntity, PredicateTestEntity2> { PropertyName = "Id", PropertyName2 = "Key", Not = false, Operator = Operator.Lt }; Dictionary<string, object> parameters = new Dictionary<string, object>(); string result = pred.GetSql(parameters); Assert.AreEqual("([PredicateTestEntity].[Id] < [PredicateTestEntity2].[Key])", result); Assert.AreEqual(0, parameters.Count); }