public void AddScriptTest() { FluentJScript fj1 = new FluentJScript(); fj1.AddScript("1+1;"); Assert.AreEqual(fj1.CurrentScript(), "1+1;\n"); }
public void ToObjectTest() { FluentJScript fj1 = new FluentJScript(); fj1.AddScript("1+1;"); fj1.Execute(); Assert.AreEqual(String.Format("{0}", fj1.ToObject()), "2"); }
public void ExecuteTest() { FluentJScript fj1 = new FluentJScript(); fj1.AddScript("1+1"); fj1.Execute(); Assert.AreEqual(fj1.ToString(), "2"); }
public void ClearTest() { FluentJScript fj1 = new FluentJScript(); fj1.AddScript("1+1;"); fj1.Clear(); Assert.AreEqual(fj1.CurrentScript(), string.Empty); }