public void TestCombineOverride() { var matcher = new Combine2(); var match = matcher.GetMatch("override", matcher.VirtualRule); Assert.IsTrue(match.Success); Assert.AreEqual(314, match.Result); }
public void TestCombine() { var matcher = new Combine2(); var match = matcher.GetMatch("ghi", matcher.Rule1); Assert.IsTrue(match.Success); Assert.AreEqual(3, match.Result); match = matcher.GetMatch("jkl", matcher.Rule2); Assert.IsTrue(match.Success); Assert.AreEqual(4, match.Result); match = matcher.GetMatch("abc", matcher.Rule5); Assert.IsTrue(match.Success); Assert.AreEqual(1, match.Result); match = matcher.GetMatch("def", matcher.Rule6); Assert.IsTrue(match.Success); Assert.AreEqual(2, match.Result); }