public override void Define() { TestFact1 fact1 = null; TestFact2 fact2 = null; When() .Match(() => fact1, x => x.IntProperty % 2 == 0) .Match(() => fact2, x => x.IntProperty % 2 == 0, x => x.IntProperty % 2 == fact1.IntProperty % 4); Then() .Do(_ => Nothing()); }
public void Setup() { SetupRule <TestRule>(); _facts1 = new TestFact1[Fact1Count]; for (int i = 0; i < Fact1Count; i++) { _facts1[i] = new TestFact1 { IntProperty = i }; } _facts2 = new TestFact2[Fact2Count]; for (int i = 0; i < Fact2Count; i++) { _facts2[i] = new TestFact2 { IntProperty = i }; } }