public void TestCaseEvaluation4() { var directive = new ForEachDirective("BOO ? OF $", "BEER", TypeConverter); Assert.AreEqual(string.Empty, Evaluate("{BOO I OF \"\"}{I}{BEER}", directive)); }
public void TestCaseEvaluation3() { var directive = new ForEachDirective("BOO ? OF $", "BEER", TypeConverter); Assert.AreEqual("123456789", Evaluate("{BOO I OF \"123456789\"}{I}{BEER}", directive)); }
public void TestCaseEvaluation2() { var directive = new ForEachDirective("BOO ? OF $", "BEER", TypeConverter); Assert.AreEqual(string.Empty, Evaluate("{BOO I OF undefined}{I}{BEER}", directive, new KeyValuePair <string, object>("undefined", null))); }
public void TestCaseConstructor3() { var directive = new ForEachDirective("OVER $ GET EACH ?", "TERMINATE", TypeConverter); Assert.AreEqual("{OVER $ GET EACH ?}...{TERMINATE}", directive.ToString()); }
public void TestCaseConstructor2() { var directive = new ForEachDirective(TypeConverter); Assert.AreEqual("{FOR EACH ? IN $}...{END}", directive.ToString()); }
public void TestCaseEvaluation5() { var directive = new ForEachDirective("BOO ? OF $", "BEER", TypeConverter); Assert.AreEqual("102030", Evaluate("{BOO I OF list}{I}{BEER}", directive, new KeyValuePair <string, object>("list", new[] { 10, 20, 30 }))); }