Examples of SRInstance


Examples of org.speakright.core.SRInstance

    TrailWrapper wrap1 = new TrailWrapper(flow);
   
    String path = String.format("tmpfiles\\sr_3.out");
    persistentStartIt(wrap1, path);
   
    SRInstance run = persistentProceed(path, "");
    TrailWrapper flow2w = (TrailWrapper)run.ApplicationFlow();
    TestWebServlet2.MyApp flow2 = (TestWebServlet2.MyApp)flow2w.innerFlow();
   
    persistentProceed(path, "");
    log("--xxx--");
    persistentProceedSlot(path, "yes", "confirm");
//    assertEquals("city", "yes", flow2.M.city().get());
    assertEquals("city", "yes", TestWebServlet2.PFlow.the_cityval);
    persistentProceed(path, "");
    run = persistentProceed(path, SRResults.ResultCode.DISCONNECT);
    assertEquals("fail", false, run.isFailed());
    assertEquals("fin", true, run.isFinished());
    assertEquals("start", true, run.isStarted());
   
    ChkTrail(run, "PFlow;PFlow;QuestionFlow;PFlow");
    flow2w = (TrailWrapper)run.ApplicationFlow();
    flow2 = (TestWebServlet2.MyApp)flow2w.innerFlow();
    assertEquals("city", "yes", flow2.M.city().get());
    log("---------end webservlet2-------");
  }
View Full Code Here

Examples of org.speakright.core.SRInstance

  @Test public void Start()
  {
    MyFlow flow = new MyFlow("a");
    TrailWrapper wrap1 = new TrailWrapper(flow);
   
    SRInstance run = new SRInstance();
    run.locations().setProjectDir(dir);
    assertEquals("", false, run.isFailed());
    assertEquals("", false, run.isFinished());
    assertEquals("", false, run.isStarted());
   
    boolean b = run.start(wrap1);
    Assert.assertTrue(b);
   
    assertEquals("", false, run.isFailed());
    assertEquals("", false, run.isFinished());
    assertEquals("", true, run.isStarted());
   
    ChkTrail(wrap1, "beg;F;E");
  }
View Full Code Here

Examples of org.speakright.core.SRInstance

  @Test public void Run1()
  {
    MyFlow flow = new MyFlow("a");
    TrailWrapper wrap1 = new TrailWrapper(flow);
   
    SRInstance run = new SRInstance();   
    run.locations().setProjectDir(dir);
    boolean b = run.start(wrap1);
    Assert.assertTrue(b);
   
    run.proceed(new SRResults());
   
    assertEquals("", false, run.isFailed());
    assertEquals("", true, run.isFinished());
    assertEquals("", true, run.isStarted());
   
    ChkTrail(run, "a");
    ChkTrail(wrap1, "beg;F;E;N;T;end");
  }
View Full Code Here

Examples of org.speakright.core.SRInstance

    TrailWrapper wrap1 = new TrailWrapper(flow);
    TrailWrapper wrap2 = new TrailWrapper(flow2);
    Flow2Wrapper outer = new Flow2Wrapper("outer", wrap1, wrap2);
    TrailWrapper wrap3 = new TrailWrapper(outer);
   
    SRInstance run = RunIt(wrap3);   
    assertEquals("fail", false, run.isFailed());
    assertEquals("fin", true, run.isFinished());
    assertEquals("start", true, run.isStarted());
   
    ChkTrail(run, "a;b");
    ChkTrail(wrap1, "beg;F;E;N;T;end");
    ChkTrail(wrap2, "beg;F;E;N;T;end");
    ChkTrail(wrap3, "beg;F;N;N;T;end");
View Full Code Here

Examples of org.speakright.core.SRInstance

    TrailWrapper wrap2 = new TrailWrapper(flow2);
   
    Flow2Wrapper flowBoth = new Flow2Wrapper("wrap", wrap1, wrap2);
    TrailWrapper wrap3 = new TrailWrapper(flowBoth);
 
    SRInstance run = RunIt(wrap3);   
    ChkTrail(run, "a;b");
    ChkTrail(wrap1, "beg;F;E;N;T;end");
    ChkTrail(wrap2, "beg;F;E;N;end");
    ChkTrail(wrap3, "beg;F;N;end");
  }
View Full Code Here

Examples of org.speakright.core.SRInstance

    TrailWrapper wrap2 = new TrailWrapper(flow2);
   
    Flow2Wrapper flowBoth = new Flow2Wrapper("wrap", wrap1, wrap2);
    TrailWrapper wrap3 = new TrailWrapper(flowBoth);
 
    SRInstance run = RunSpecial(wrap3, wrap2, SRResults.ResultCode.DISCONNECT);
    ChkTrail(run, "a;b");
    ChkTrail(wrap1, "beg;F;E;N;T;end");
    ChkTrail(wrap2, "beg;F;E;end");
    ChkTrail(wrap3, "beg;F;N;DISC;end");
  }
View Full Code Here

Examples of org.speakright.core.SRInstance

    TrailWrapper wrap2 = new TrailWrapper(flow2);
   
    Flow2Wrapper flowBoth = new Flow2Wrapper("wrap", wrap1, wrap2);
    TrailWrapper wrap3 = new TrailWrapper(flowBoth);
 
    SRInstance run = RunSpecial(wrap3, wrap1, SRResults.ResultCode.NOINPUT);
    ChkTrail(run, "a");
    ChkTrail(wrap1, "beg;F;E;NOINPUT;end");
    ChkTrail(wrap2, "");
    ChkTrail(wrap3, "beg;F;end");
  }
View Full Code Here

Examples of org.speakright.core.SRInstance

    TrailWrapper wrap2 = new TrailWrapper(flow2);
   
    Flow2Wrapper flowBoth = new Flow2Wrapper("wrapthrow", wrap1, wrap2);
    TrailWrapper wrap3 = new TrailWrapper(flowBoth);
 
    SRInstance run = RunIt(wrap3);
    ChkTrail(run, "a");
    ChkTrail(wrap1, "beg;F;E;N;end");
    ChkTrail(wrap2, "");
    ChkTrail(wrap3, "beg;F;CATCH;end");
  }
View Full Code Here

Examples of org.speakright.core.SRInstance

    TrailWrapper wrap2 = new TrailWrapper(flow2);
   
    Flow2Wrapper flowBoth = new Flow2Wrapper("wrapthrow", wrap1, wrap2);
    TrailWrapper wrap3 = new TrailWrapper(flowBoth);
 
    SRInstance run = RunIt(wrap3);
    ChkTrail(run, "a");
    ChkTrail(wrap1, "beg;F;E;end");
    ChkTrail(wrap2, "");
    ChkTrail(wrap3, "beg;F;CATCH;end");
  }
View Full Code Here

Examples of org.speakright.core.SRInstance

    TrailWrapper wrap2 = new TrailWrapper(flow2);
   
    Flow2Wrapper flowBoth = new Flow2Wrapper("valwrap", wrap1, wrap2);
    TrailWrapper wrap3 = new TrailWrapper(flowBoth);
 
    SRInstance run = StartIt(wrap3);
    Proceed(run, "111");
   
    assertEquals("fail", false, run.isFailed());
    assertEquals("fin", true, run.isFinished());
    ChkTrail(run, "a");
    ChkTrail(wrap1, "beg;F;E;end");
    ChkTrail(wrap2, "");
    ChkTrail(wrap3, "beg;F;VALFAIL;end");
  }
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.