public void TestCaseEvaluation4() { var directive = new IfElseDirective("MAYBE $", "OTHERWISE", "DONE", TypeConverter); Assert.AreEqual("no", Evaluate("{MAYBE 0}yes{OTHERWISE}no{DONE}", directive)); }
public void TestCaseConstructor2() { var directive = new IfElseDirective(TypeConverter); Assert.AreEqual("{IF $ THEN}...{ELSE}...{END}", directive.ToString()); }
public void TestCaseConstructor3() { var directive = new IfElseDirective("MAYBE $ IN WHICH CASE", "OTHERWISE", "TERMINATE", TypeConverter); Assert.AreEqual("{MAYBE $ IN WHICH CASE}...{OTHERWISE}...{TERMINATE}", directive.ToString()); }
public void TestCaseEvaluation6() { var directive = new IfElseDirective("MAYBE $", "OTHERWISE", "DONE", TypeConverter); Assert.AreEqual("yes", Evaluate("{MAYBE defined}yes{OTHERWISE}no{DONE}", directive, new KeyValuePair <string, object>("defined", this))); }