Package fitnesse.slim.instructions

Examples of fitnesse.slim.instructions.MakeInstruction


  @Test
  public void canBuildInstructionsForMultipleCallsToSameFunction() throws Exception {
    makeDynamicDecisionTableAndBuildInstructions(dynamicDecisionTableWithSameFunctionMultipleTimes);
    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("func?", "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, "execute"),
            new CallInstruction(id(n++), TABLE_INSTANCE_NAME, "get", new Object[]{"func"}),
View Full Code Here


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

      "|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++), TABLE_INSTANCE_NAME, "fixture"),
            new CallInstruction(id(n++),TABLE_INSTANCE_NAME, "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++), TABLE_INSTANCE_NAME, "beginTable"),
            new CallInstruction(id(n++), TABLE_INSTANCE_NAME, "reset"),
View Full Code Here

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

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

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

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

  }

  @Test
  public void correctInstructionsForLibraryTableForOneLibrary() throws Exception {
    buildInstructionsFor("|echo support|\n");
    List<MakeInstruction> expectedInstructions = Arrays.asList(new MakeInstruction("library_id_0", "library1", "EchoSupport"));
    assertEquals(expectedInstructions, instructions);
  }
View Full Code Here

  }

  @Test
  public void correctInstructionsForLibraryTableForMultipleLibraries() throws Exception {
    buildInstructionsFor("|echo support|\n|file support|\n");
    List<MakeInstruction> expectedInstructions = Arrays.asList(new MakeInstruction("library_id_0", "library1", "EchoSupport"), new MakeInstruction("library_id_1", "library2", "FileSupport"));
    assertEquals(expectedInstructions, instructions);
  }
View Full Code Here

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

  @Test
  public void scriptWithActor() throws Exception {
    buildInstructionsForWholeTable("|script|Bob|\n");
    List<MakeInstruction> expectedInstructions =
      asList(
              new MakeInstruction("htmlScriptTable_id_0", "htmlScriptTableActor", "Bob")
      );
    assertEquals(expectedInstructions, instructions());
  }
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.