public void TestAbstractNotPossible3() { var rules = new CharGenericRules(); bool newRule = rules.AbstractGenericRule("CONSTANT1 xyz", "zyx", "CONSTANT2 abc", "ca", string.Empty); Assert.IsFalse(newRule); }
public void TestAbstractAndApplyRuleCompound() { var rules = new CharGenericRules(); bool newRule = rules.AbstractGenericRule("CONSTANT ab cde", "edcba", "CONSTANT xy zab", "bazyx", string.Empty); Assert.IsTrue(newRule); string output = rules.ApplyMatchingRule("CONSTANT xa xyb"); Assert.AreEqual("byxax", output); }
public void TestAbstractAndApplyRuleWithRepeatedChars() { var rules = new CharGenericRules(); bool newRule = rules.AbstractGenericRule("CONSTANT abcd", "abcd", "CONSTANT abba", "abba", string.Empty); Assert.IsTrue(newRule); string output = rules.ApplyMatchingRule("CONSTANT bkjt"); Assert.AreEqual("bkjt", output); }
public void TestAbstractAndApplyRuleWithCommonWordOnOutput() { var rules = new CharGenericRules(); bool newRule = rules.AbstractGenericRule("CONSTANT master", "m a s t e r", "CONSTANT insect", "i n s e c t", string.Empty); Assert.IsTrue(newRule); string output = rules.ApplyMatchingRule("CONSTANT rabbit"); Assert.AreEqual("r a b b i t", output); }
public void TestAbstractAndApplyRule1() { var rules = new CharGenericRules(); bool newRule = rules.AbstractGenericRule("CONSTANT xyz", "zyx", "CONSTANT abc", "cba", string.Empty); Assert.IsTrue(newRule); string output = rules.ApplyMatchingRule("CONSTANT bkj"); Assert.AreEqual("jkb", output); }