Package org.speakright.core.flows

Examples of org.speakright.core.flows.BasicFlow


public class TestTransfer extends BaseTest {

  @Test public void simpleNesting()
  {
    BasicFlow flow = new BasicFlow();
    flow.setName("aaa");
    //add sub-flows that are single-shots
    flow.add(new PromptFlow("a"));
    flow.add(new TransferFlow(TransferFlow.TransferType.Blind, "222", "see ya"));

    TrailWrapper wrap1 = new TrailWrapper(flow);
   
    SRInstance run = RunIt(wrap1);
    ChkTrail(run, "PromptFlow;transfer");
View Full Code Here


  }
 
  @Test public void xferFailedBusy()
  {
    log("---------XFERFAILEDBUSY..");
    BasicFlow flow = new BasicFlow();
    flow.setName("aaa");
    //add sub-flows that are single-shots
    flow.add(new PromptFlow("a"));
    flow.add(new TransferFlow(TransferFlow.TransferType.Bridge, "222", "see ya"));
    flow.add(new PromptFlow("b"));

    TrailWrapper wrap1 = new TrailWrapper(flow);

    SRInstance run = StartIt(wrap1);
    Proceed(run, ""); //a
View Full Code Here

  }
 
  @Test public void xferSucceed()
  {
    log("---------xferSucceed..");
    BasicFlow flow = new BasicFlow();
    flow.setName("aaa");
    //add sub-flows that are single-shots
    flow.add(new PromptFlow("a"));
    flow.add(new TransferFlow(TransferFlow.TransferType.Bridge, "222", "see ya"));
    flow.add(new PromptFlow("b"));

    TrailWrapper wrap1 = new TrailWrapper(flow);

    SRInstance run = StartIt(wrap1);
    Proceed(run, ""); //a
View Full Code Here

public class TestContentDumping extends BaseTest {

  @Test public void simpleNesting()
  {
    BasicFlow flow = new BasicFlow();
    flow.setName("aaa");
    //add sub-flows that are single-shots
    flow.add(new PromptFlow("a"));
    flow.add(new PromptFlow("b"));
    flow.add(new PromptFlow("c"));

    TrailWrapper wrap1 = new TrailWrapper(flow);
   
    SRInstance.forceUCIReset();
    ContentLogger.ResetNextNum();
View Full Code Here

public class TestCore extends BaseTest {

  @Test public void BasicFlow()
  {
    BasicFlow flow = new BasicFlow();
    assertEquals("name", flow.name(), "BasicFlow");
    flow.setName("abc");
    assertEquals("name", flow.name(), "abc");

    Assert.assertSame(flow, flow.getFirst(null));
    assertNull(flow.getNext(null, null));
    assertNull(flow.onCatch(null, null, null, null));
    assertNull(flow.onDisconnect(null, null));
    assertNull(flow.onNoInput(null, null));
   
    //!!later assert Execute generates no content
   
  }
View Full Code Here

public class TestNesting extends BaseTest {

  @Test public void simpleNesting()
  {
    BasicFlow flow = new BasicFlow();
    flow.setName("aaa");
    //add sub-flows that are single-shots
    flow.add(new PromptFlow("a"));
    flow.add(new PromptFlow("b"));
    flow.add(new PromptFlow("c"));

    TrailWrapper wrap1 = new TrailWrapper(flow);
   
    SRInstance run = RunIt(wrap1);
    ChkTrail(run, "PromptFlow;PromptFlow;PromptFlow");
View Full Code Here

    ChkTrail(run, "PromptFlow;PromptFlow;PromptFlow");
  }

  @Test public void repeatexecutionNesting()
  {
    BasicFlow flow = new BasicFlow();
    flow.setName("aaar");
    //add sub-flows that are single-shots
    flow.add(new RepeatFlow("ar"));
    flow.add(new RepeatFlow("br"));
    flow.add(new PromptFlow("c"));

    TrailWrapper wrap1 = new TrailWrapper(flow);
   
    SRInstance run = RunIt(wrap1);
    ChkTrail(run, "RepeatFlow;RepeatFlow;RepeatFlow;RepeatFlow;PromptFlow");
View Full Code Here

  }
 
  @Test public void optionalFlows()
  {
    log("--optionalflow--");
    BasicFlow flow = new BasicFlow();
    flow.setName("aaa");
    //add sub-flows that are single-shots
    flow.add(new OptionalFlow("a", false));
    flow.add(new OptionalFlow("b", true));
    flow.add(new OptionalFlow("c", true));

    TrailWrapper wrap1 = new TrailWrapper(flow);
   
    SRInstance run = RunIt(wrap1);
    assertEquals("fin", true, run.isFinished());
View Full Code Here

  }

  @Test public void optionalFlowsSecond()
  {
    log("--optionalflowsecond--");
    BasicFlow flow = new BasicFlow();
    flow.setName("aaa");
    //add sub-flows that are single-shots
    flow.add(new OptionalFlow("a", true));
    flow.add(new OptionalFlow("b", false));
    flow.add(new OptionalFlow("c", true));

    TrailWrapper wrap1 = new TrailWrapper(flow);
   
    SRInstance run = RunIt(wrap1);
    assertEquals("fin", true, run.isFinished());
View Full Code Here

TOP

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

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.