예제 #1
0
 @Test
 public void test004() throws Exception {
   J2V8Handler h =
       new J2V8Handler(
           readFile("../../src/main/resources/js/j2v8test04.js", Charset.defaultCharset()), 1);
   h.init();
   assertEquals(30, h.getCommitInterval());
   assertEquals(false, h.getTerminateOnBadData());
   assertEquals(false, h.getTerminateOnBadEval());
 }
예제 #2
0
 @Test
 public void test006() throws Exception {
   J2V8Handler h =
       new J2V8Handler(
           readFile("../../src/main/resources/js/j2v8test04.js", Charset.defaultCharset()), 1);
   h.init();
   assertEquals(30, h.getCommitInterval());
   assertEquals(false, h.getTerminateOnBadData());
   try {
     h.process(
         readFile("../../src/main/resources/js/j2v8test04_data.js", Charset.defaultCharset()));
     assertEquals(true, true);
   } catch (Exception e) {
     System.err.println(e.getMessage());
     assertEquals(true, false);
   }
 }