public void TestNoDup() { var value = new QueryGraphValue(); value.AddRelOp(MakeIdent("B"), QueryGraphRangeEnum.LESS_OR_EQUAL, MakeIdent("A"), false); value.AddRelOp(MakeIdent("B"), QueryGraphRangeEnum.LESS_OR_EQUAL, MakeIdent("A"), false); AssertRanges(new object[][] { new object[] { "B", null, null, QueryGraphRangeEnum.LESS_OR_EQUAL, "A" } }, value); value = new QueryGraphValue(); value.AddRange(QueryGraphRangeEnum.RANGE_CLOSED, MakeIdent("B"), MakeIdent("C"), MakeIdent("A")); value.AddRange(QueryGraphRangeEnum.RANGE_CLOSED, MakeIdent("B"), MakeIdent("C"), MakeIdent("A")); AssertRanges(new object[][] { new object[] { null, "B", "C", QueryGraphRangeEnum.RANGE_CLOSED, "A" } }, value); }
private void TryAdd(string propertyKeyOne, QueryGraphRangeEnum opOne, ExprIdentNode valueOne, string propertyKeyTwo, QueryGraphRangeEnum opTwo, ExprIdentNode valueTwo, object[][] expected) { var value = new QueryGraphValue(); value.AddRelOp(MakeIdent(propertyKeyOne), opOne, valueOne, true); value.AddRelOp(MakeIdent(propertyKeyTwo), opTwo, valueTwo, true); AssertRanges(expected, value); value = new QueryGraphValue(); value.AddRelOp(MakeIdent(propertyKeyTwo), opTwo, valueTwo, true); value.AddRelOp(MakeIdent(propertyKeyOne), opOne, valueOne, true); AssertRanges(expected, value); }