public void TestNoDup() { var value = new QueryGraphValueForge(); value.AddRelOp(MakeIdent("B"), QueryGraphRangeEnum.LESS_OR_EQUAL, MakeIdent("A"), false); value.AddRelOp(MakeIdent("B"), QueryGraphRangeEnum.LESS_OR_EQUAL, MakeIdent("A"), false); AssertRanges(new[] { new object[] { "B", null, null, QueryGraphRangeEnum.LESS_OR_EQUAL, "A" } }, value); value = new QueryGraphValueForge(); value.AddRange(QueryGraphRangeEnum.RANGE_CLOSED, MakeIdent("B"), MakeIdent("C"), MakeIdent("A")); value.AddRange(QueryGraphRangeEnum.RANGE_CLOSED, MakeIdent("B"), MakeIdent("C"), MakeIdent("A")); AssertRanges(new[] { 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 QueryGraphValueForge(); value.AddRelOp(MakeIdent(propertyKeyOne), opOne, valueOne, true); value.AddRelOp(MakeIdent(propertyKeyTwo), opTwo, valueTwo, true); AssertRanges(expected, value); value = new QueryGraphValueForge(); value.AddRelOp(MakeIdent(propertyKeyTwo), opTwo, valueTwo, true); value.AddRelOp(MakeIdent(propertyKeyOne), opOne, valueOne, true); AssertRanges(expected, value); }