Package net.ex337.scriptus.model

Examples of net.ex337.scriptus.model.ScriptProcess.call()


       
        ScriptProcess p = datastore.newProcess(TEST_USER, "return.js", false, "", "owner", TransportType.Dummy);
       
        p.save();
       
        ScriptAction r = p.call();
       
        assertTrue("Correct result", r instanceof NormalTermination);
       
        NormalTermination n = (NormalTermination) r;
View Full Code Here


       
        p.save();
       
        p = datastore.getProcess(p.getPid());
       
        ScriptAction r = p.call();
       
        assertTrue("Correct result", r instanceof NormalTermination);
       
        NormalTermination n = (NormalTermination) r;
View Full Code Here

   
    ScriptProcess p = datastore.newProcess(TEST_USER, "log.js", false, "", "owner", TransportType.Dummy);
   
    p.save();
   
    ScriptAction r = p.call();
   
    assertTrue("Correct result", r instanceof NormalTermination);
   
    NormalTermination n = (NormalTermination) r;
View Full Code Here

   */
  public void test_prototypes() throws IOException {
   
    ScriptProcess p = datastore.newProcess(TEST_USER, "prototypes.js", false, "", "owner", TransportType.Dummy);
   
    ScriptAction r = p.call();
   
    assertTrue("Correct result", r instanceof Say);
   
    p.save();

View Full Code Here

    r.visit(new ScriptusFacade(datastore, c, m, conf) {

        @Override
      public void execute(UUID pid) {
        ScriptProcess pp = datastore.getProcess(pid);
        ScriptAction rr = pp.call();
                assertEquals("final result", NormalTermination.class, rr.getClass());
                assertEquals("final result value OK", "foo", ((NormalTermination)rr).getResult());
      }
     
    }, p);
View Full Code Here

  public void test_syntaxError() throws IOException {
   
    ScriptProcess p = datastore.newProcess(TEST_USER, "syntaxError.js", false, "", "owner", TransportType.Dummy);
   
    ScriptAction r = p.call();

    assertTrue("Error termination", r instanceof ErrorTermination);
   
  }
View Full Code Here

  public void test_throwException() throws IOException {
   
    ScriptProcess p = datastore.newProcess(TEST_USER, "throw.js", false, "", "owner", TransportType.Dummy);
   
    ScriptAction r = p.call();

    assertTrue("Error termination", r instanceof ErrorTermination);
   
  }
 
View Full Code Here

 
  public void test_fiddleWithAPI() throws IOException {
   
    ScriptProcess p = datastore.newProcess(TEST_USER, "fiddle.js", false, "", "owner", TransportType.Dummy);
   
    ScriptAction r = p.call();
   
    assertTrue("Didn't fork correctly", ! (r instanceof Fork));
  }

  public void test_fiddleWithAPI2() throws IOException {
View Full Code Here

  public void test_fiddleWithAPI2() throws IOException {
   
    ScriptProcess p = datastore.newProcess(TEST_USER, "fiddle2.js", false, "", "owner", TransportType.Dummy);
   
    ScriptAction r = p.call();
   
    assertTrue("error condition", r instanceof ErrorTermination);
   
  }
View Full Code Here

 
  public void test_fork() throws IOException {
   
    ScriptProcess p = datastore.newProcess(TEST_USER, "fork.js", false, "", "owner", TransportType.Dummy);
   
    ScriptAction r = p.call();
   
    assertTrue("Forked correctly", r instanceof Fork);
   
    r.visit(new ScriptusFacade(datastore, c, m, conf), p);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.