Created
December 13, 2013 14:20
Revisions
-
ukiuni revised this gist
Dec 14, 2013 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ @Test public void testPlus() throws ScriptException, IOException { ScriptEngine engine = new ScriptEngineManager().getEngineByName("javascript"); FileReader reader = new FileReader("WebContent/js/scriptTobeTested.js"); engine.eval(reader); Assert.assertEquals(true, engine.eval("plus(1, 1) == 2")); reader.close(); } -
ukiuni revised this gist
Dec 13, 2013 . No changes.There are no files selected for viewing
-
ukiuni created this gist
Dec 13, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ function plus(x, y) { return x+y; }