Package org.speakright.core.flows

Examples of org.speakright.core.flows.LoopFlow


//  }

  @Test public void optionalFlowsInLoop1()
  {
    log("--xxxoptionalFlowsInLoop--");
    LoopFlow flow = this.createLoopFlow(false, true, true);
    TrailWrapper wrap1 = new TrailWrapper(flow);
   
    SRInstance run = RunIt(wrap1);
    assertEquals("fin", true, run.isFinished());
    assertEquals("failed", false, run.isFailed());
View Full Code Here


    ChkTrail(run, "b;c;b;c");
  }
  @Test public void optionalFlowsInLoop2()
  {
    log("--xxxoptionalFlowsInLoop2--");
    LoopFlow flow = this.createLoopFlow(true, false, true);
    TrailWrapper wrap1 = new TrailWrapper(flow);
   
    SRInstance run = RunIt(wrap1);
    assertEquals("fin", true, run.isFinished());
    assertEquals("failed", false, run.isFailed());
View Full Code Here

    ChkTrail(run, "a;c;a;c");
  }
  @Test public void optionalFlowsInLoop3()
  {
    log("--xxxoptionalFlowsInLoop3--");
    LoopFlow flow = this.createLoopFlow(true, true, false);
    TrailWrapper wrap1 = new TrailWrapper(flow);
   
    SRInstance run = RunIt(wrap1);
    assertEquals("fin", true, run.isFinished());
    assertEquals("failed", true, run.isFailed()); //FAILED since last sub-flow can't return null
View Full Code Here

    ChkTrail(run, "a;b;a;b");
  }

  LoopFlow createLoopFlow(boolean b1, boolean b2, boolean b3)
  {
    LoopFlow flow = new LoopFlow(2);
    flow.setName("again");
    //add sub-flows that are single-shots
    flow.add(new OptionalFlow("a", b1));
    flow.add(new OptionalFlow("b", b2));
    flow.add(new OptionalFlow("c", b3));
    return flow;
  }
View Full Code Here

    binder.injectModel(flow);
    assertEquals("model", m, flow.M);

    // MyLoop doesn't have model M so binder does nothing
    LoopFlow loop = new LoopFlow(3);
    loop.add(new MyFlow("e"));
    loop.add(new MyFlow("f"));
    binder.injectModel(loop);
  }
View Full Code Here

    assertEquals("run", false, run.isFinished());
  }
 
  public void testPlayOnceEver()
  {
    LoopFlow flow = new LoopFlow(3);
    flow.add(new PlayOnceFlow("abc", true));
    flow.add(new ZFlow("news"));
   
    BaseTest base = new BaseTest();
    VoiceXMLSpeechPageWriter.m_renderHeaderAndFooter = false;
    SRInstance run = base.StartIt(flow);
   
View Full Code Here

TOP

Related Classes of org.speakright.core.flows.LoopFlow

Copyright © 2018 www.massapicom. 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.