Package fitnesse.slim.instructions

Examples of fitnesse.slim.instructions.CallInstruction


  @Test
  public void checkWithFunctionAndTrailingName() throws Exception {
    buildInstructionsFor("|check|function|arg|trail|result|\n");
    List<CallInstruction> expectedInstructions =
      asList(
              new CallInstruction("htmlScriptTable_id_0", "htmlScriptTableActor", "functionTrail", new Object[]{"arg"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here


  @Test
  public void rejectWithFunctionCall() throws Exception {
    buildInstructionsFor("|reject|function|arg|\n");
    List<CallInstruction> expectedInstructions =
      asList(
              new CallInstruction("htmlScriptTable_id_0", "htmlScriptTableActor", "function", new Object[]{"arg"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void ensureWithFunctionCall() throws Exception {
    buildInstructionsFor("|ensure|function|arg|\n");
    List<CallInstruction> expectedInstructions =
      asList(
              new CallInstruction("htmlScriptTable_id_0", "htmlScriptTableActor", "function", new Object[]{"arg"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void showWithFunctionCall() throws Exception {
    buildInstructionsFor("|show|function|arg|\n");
    List<CallInstruction> expectedInstructions =
      asList(
              new CallInstruction("htmlScriptTable_id_0", "htmlScriptTableActor", "function", new Object[]{"arg"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void useSymbol() throws Exception {
    buildInstructionsFor("|function|$V|\n");
    List<CallInstruction> expectedInstructions =
      asList(
              new CallInstruction("htmlScriptTable_id_0", "htmlScriptTableActor", "function", new Object[]{"$V"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void instructionsForEmptyTableTable() throws Exception {
    makeTableTableAndBuildInstructions(tableTableHeader);
    List<Instruction> expectedInstructions = asList(
            new MakeInstruction("tableTable_id_0", "tableTable_id", "fixture", new Object[]{"argument"}),
            new CallInstruction("tableTable_id_1", "tableTable_id", "doTable", new Object[]{asList()})
    );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void instructionsForTableTable() throws Exception {
    makeTableTableAndBuildInstructions(tableTableHeader + "|a|b|\n|x|y|\n");
    List<Instruction> expectedInstructions = asList(
            new MakeInstruction("tableTable_id_0", "tableTable_id", "fixture", new Object[]{"argument"}),
            new CallInstruction("tableTable_id_1", "tableTable_id", "doTable", new Object[]{asList(asList("a", "b"), asList("x", "y"))})
    );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

        "|input|\n" +
        "|7"
    );
    List<CallInstruction> expectedInstructions =
      asList(
              new CallInstruction("decisionTable_did_0/diffScriptTable_s_id_0", "diffScriptTableActor", "function", new Object[]{"7"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

        "|bob|xyzzy|7734|\n" +
        "|bill|yabba|8892"
    );
    List<CallInstruction> expectedInstructions =
      asList(
              new CallInstruction("decisionTable_did_0/diffScriptTable_s_id_0", "diffScriptTableActor", "loginWithPasswordAndPin", new Object[]{"bob", "xyzzy", "7734"}),
              new CallInstruction("decisionTable_did_0/diffScriptTable_s_id_1", "diffScriptTableActor", "currentUserProfileUrl", new Object[0]),
              new CallInstruction("decisionTable_did_1/diffScriptTable_s_id_0", "diffScriptTableActor", "loginWithPasswordAndPin", new Object[]{"bill", "yabba", "8892"}),
              new CallInstruction("decisionTable_did_1/diffScriptTable_s_id_1", "diffScriptTableActor", "currentUserProfileUrl", new Object[0])
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

        "\n" +
        "!|script|\n" +
        "|myScenario|7|\n"
    );
    List<CallInstruction> expectedInstructions =
            asList(new CallInstruction("scriptTable_id_0/scriptTable_s_id_0", "scriptTableActor", "function", new Object[]{"7"}));
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

TOP

Related Classes of fitnesse.slim.instructions.CallInstruction

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.