1   package delight.nashornsandbox.tests;
2   
3   import delight.nashornsandbox.NashornSandbox;
4   import delight.nashornsandbox.NashornSandboxes;
5   import org.junit.Assert;
6   import org.junit.Test;
7   
8   @SuppressWarnings("all")
9   public class TestSimpleEval {
10    @Test
11    public void test() {
12      final NashornSandbox sandbox = NashornSandboxes.create();
13      final Object res = sandbox.eval("var x = 1 + 1; x;");
14      Assert.assertEquals(Integer.valueOf(2), res);
15    }
16  }