Package fitnesse.slim.instructions

Examples of fitnesse.slim.instructions.MakeInstruction


  @Test
  public void localizedStartStatement() throws Exception {
    buildInstructionsFor("|localized start|Bob|\n", true);
    List<MakeInstruction> expectedInstructions =
      asList(
              new MakeInstruction("localizedScriptTable_id_0", "localizedScriptTableActor", "Bob")
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here


  @Test
  public void scriptWithActor() throws Exception {
    buildInstructionsForWholeTable("|script|Bob|\n", false);
    List<MakeInstruction> expectedInstructions =
      asList(
              new MakeInstruction("scriptTable_id_0", "scriptTableActor", "Bob")
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void localizedScriptWithActor() throws Exception {
    buildInstructionsForWholeTable("|localized script|Bob|\n", true);
    List<MakeInstruction> expectedInstructions =
      asList(
              new MakeInstruction("localizedScriptTable_id_0", "localizedScriptTableActor", "Bob")
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void startStatementWithArguments() throws Exception {
    buildInstructionsFor("|start|Bob martin|x|y|\n", false);
    List<MakeInstruction> expectedInstructions =
      asList(
              new MakeInstruction("scriptTable_id_0", "scriptTableActor", "BobMartin", new Object[]{"x", "y"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void localizedStartStatementWithArguments() throws Exception {
    buildInstructionsFor("|localized start|Bob martin|x|y|\n", true);
    List<MakeInstruction> expectedInstructions =
      asList(
              new MakeInstruction("localizedScriptTable_id_0", "localizedScriptTableActor", "BobMartin", new Object[]{"x", "y"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void scriptStatementWithArguments() throws Exception {
    buildInstructionsForWholeTable("|script|Bob martin|x|y|\n", false);
    List<MakeInstruction> expectedInstructions =
      asList(
              new MakeInstruction("scriptTable_id_0", "scriptTableActor", "BobMartin", new Object[]{"x", "y"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  }

  @Test
  public void scriptStatementInOneColumnWithArguments() throws Exception {
    buildInstructionsForWholeTable("|script:Bob martin|x|y|\n", false);
    List<MakeInstruction> expectedInstructions = asList(new MakeInstruction("scriptTable_id_0", "scriptTableActor", "BobMartin", new Object[]{"x", "y"}));
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void localizedScriptStatementWithArguments() throws Exception {
    buildInstructionsForWholeTable("|localized script|Bob martin|x|y|\n", true);
    List<MakeInstruction> expectedInstructions =
      asList(
              new MakeInstruction("localizedScriptTable_id_0", "localizedScriptTableActor", "BobMartin", new Object[]{"x", "y"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void decisionTableCanBeConstructorOnly() throws Exception {
    makeDecisionTableAndBuildInstructions("|fixture|argument|\n");
    List<Instruction> expectedInstructions = asList(
            new MakeInstruction("decisionTable_id_0", "decisionTable_id", "fixture", new Object[]{"argument"}),
            new CallInstruction("decisionTable_id_1", "decisionTable_id", "table", new Object[]{asList()})
    );
    assertEquals(expectedInstructions, instructions);
    Map<String, Object> pseudoResults = SlimCommandRunningClient.resultToMap(
            asList(
View Full Code Here

  @Test
  public void canBuildInstructionsForSimpleDecisionTable() throws Exception {
    makeDecisionTableAndBuildInstructions(simpleDecisionTable);
    int n = 0;
    List<Instruction> expectedInstructions = asList(
            new MakeInstruction(id(n++), "decisionTable_id", "fixture", new Object[]{"argument"}),
            new CallInstruction(id(n++), "decisionTable_id", "table", new Object[]{asList(asList("var", "func?"), asList("3", "5"), asList("7", "9"))}),
            new CallInstruction(id(n++), "decisionTable_id", "beginTable"),
            new CallInstruction(id(n++), "decisionTable_id", "reset"),
            new CallInstruction(id(n++), "decisionTable_id", "setVar", new Object[]{"3"}),
            new CallInstruction(id(n++), "decisionTable_id", "execute"),
View Full Code Here

TOP

Related Classes of fitnesse.slim.instructions.MakeInstruction

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.