Example #1
0
 public void Transformations_AbstractTrace_ResolveWhere1()
 {
     AssertExtensions.AssertContainsOnly(trace.ResolveInWhere(ruleT1, s => s == "a"), "b");
     AssertExtensions.AssertContainsOnly(trace.ResolveInWhere(ruleT1, s => s == "b"), null);
     trace.ResolveInWhere(ruleT1, o => true).AssertContainsOnly("b", null);
     trace.ResolveInWhere(ruleT1, null as Predicate <string>).AssertContainsOnly("b", null);
     AssertExtensions.AssertContainsOnly(trace.ResolveInWhere(ruleT2, (s1, s2) => s1 == "a" && s2 == "b"), "c");
     AssertExtensions.AssertContainsOnly(trace.ResolveInWhere(ruleT2, (s1, s2) => s1 == "b" && s2 == "c"), null);
     trace.ResolveInWhere(ruleT2, o => true).AssertContainsOnly("c", null);
     trace.ResolveInWhere(ruleT2, null as Func <string, string, bool>).AssertContainsOnly("c", null);
     AssertExtensions.AssertContainsOnly(trace.ResolveInWhere(ruleTN, o => object.Equals(o[0], "a") && object.Equals(o[1], "b") && object.Equals(o[2], "c")), "d");
     AssertExtensions.AssertContainsOnly(trace.ResolveInWhere(ruleTN, o => object.Equals(o[0], "b") && object.Equals(o[1], "c") && object.Equals(o[2], "d")), null);
     trace.ResolveInWhere(ruleTN, o => true).AssertContainsOnly("d", null);
     trace.ResolveInWhere(ruleTN, null as Predicate <object[]>).AssertContainsOnly("d", null);
 }