Examples of MakeInstruction


Examples of fitnesse.slim.instructions.MakeInstruction

            "|3|5|\n" +
            "|7|9|\n";
    makeDecisionTableAndBuildInstructions(decisionTableWithSameSetterMultipleTimes);
    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", "var"), 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", "setVar", new Object[]{"5"}),
View Full Code Here

Examples of fitnesse.slim.instructions.MakeInstruction

  @Test
  public void canBuildInstructionsForMultipleCallsToSameFunction() throws Exception {
    makeDecisionTableAndBuildInstructions(decisionTableWithSameFunctionMultipleTimes);
    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("func?", "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", "execute"),
            new CallInstruction(id(n++), "decisionTable_id", "func"),
View Full Code Here

Examples of fitnesse.slim.instructions.MakeInstruction

      "|var|func!|\n" +
      "|3|5|\n" +
      "|7|9|\n");
    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

Examples of fitnesse.slim.instructions.MakeInstruction

      "|a|fa?|b|fb?|c|fc?|d|e|f|fd?|fe?|ff?|\n" +
      "|a|a|b|b|c|c|d|e|f|d|e|f|\n");
    int n = 0;

    List<Instruction> expectedInstructions = asList(
            new MakeInstruction(id(n++), "decisionTable_id", "fixture"),
            new CallInstruction(id(n++),"decisionTable_id", "table", new Object[] {asList(
                asList("a", "fa?", "b", "fb?", "c", "fc?", "d", "e", "f", "fd?", "fe?", "ff?"),
                asList("a", "a", "b", "b", "c", "c", "d", "e", "f", "d", "e", "f"))}),
            new CallInstruction(id(n++), "decisionTable_id", "beginTable"),
            new CallInstruction(id(n++), "decisionTable_id", "reset"),
View Full Code Here

Examples of fitnesse.slim.instructions.MakeInstruction

        "|3|$V=|\n" +
        "|$V|9|\n"
    );
    int n=0;
    List<Instruction> expectedInstructions = asList(
            new MakeInstruction(id(n++), "decisionTable_id", "fixture"),
            new CallInstruction(id(n++), "decisionTable_id", "table", new Object[]{asList(asList("var", "func?"), asList("3", "$V="), asList("$V", "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

Examples of fitnesse.slim.instructions.MakeInstruction

      "|DT:slim test|\n" +
        "|x|\n" +
        "|y|\n"
    );

    Instruction makeInstruction = new MakeInstruction("decisionTable_id_0", "decisionTable_id", "SlimTest");
    assertEquals(makeInstruction, instructions.get(0));
  }
View Full Code Here

Examples of fitnesse.slim.instructions.MakeInstruction

  @Test
  @SuppressWarnings("unchecked")
  public void instructionsForQueryTable() throws Exception {
    makeQueryTableAndBuildInstructions(queryTableHeader);
    List<Instruction> expectedInstructions = asList(
            new MakeInstruction("queryTable_id_0", "queryTable_id", "fixture", new Object[]{"argument"}),
            new CallInstruction("queryTable_id_1", "queryTable_id", "table", new Object[]{asList(asList("n", "2n"))}),
            new CallInstruction("queryTable_id_2", "queryTable_id", "query"));
    org.junit.Assert.assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

Examples of fitnesse.slim.instructions.MakeInstruction

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

Examples of fitnesse.slim.instructions.MakeInstruction

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

Examples of fitnesse.slim.instructions.MakeInstruction

            "|3|5|\n" +
            "|7|9|\n";
    makeDynamicDecisionTableAndBuildInstructions(decisionTableWithSameSetterMultipleTimes);
    int n = 0;
    List<Instruction> expectedInstructions = asList(
            new MakeInstruction(id(n++), TABLE_INSTANCE_NAME, "fixture", new Object[]{"argument"}),
            new CallInstruction(id(n++), TABLE_INSTANCE_NAME, "table", new Object[]{asList(asList("var", "var"), asList("3", "5"), asList("7", "9"))}),
            new CallInstruction(id(n++), TABLE_INSTANCE_NAME, "beginTable"),
            new CallInstruction(id(n++), TABLE_INSTANCE_NAME, "reset"),
            new CallInstruction(id(n++), TABLE_INSTANCE_NAME, "set", new Object[]{"var", "3"}),
            new CallInstruction(id(n++), TABLE_INSTANCE_NAME, "set", new Object[]{"var", "5"}),
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.