Package fitnesse.slim.instructions

Examples of fitnesse.slim.instructions.CallInstruction


  @Test
  public void complexFunctionCallWithManyArguments() throws Exception {
    buildInstructionsFor("|eat|3|meals with|12|grams protein|3|grams fat |\n", false);
    List<CallInstruction> expectedInstructions =
      asList(
              new CallInstruction("scriptTable_id_0", "scriptTableActor", "eatMealsWithGramsProteinGramsFat", new Object[]{"3", "12", "3"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here


  @Test
  public void functionCallWithSequentialArgumentProcessingAndOneArgument() throws Exception {
    buildInstructionsFor("|function;|arg0|\n", false);
    List<CallInstruction> expectedInstructions =
      asList(
              new CallInstruction("scriptTable_id_0", "scriptTableActor", "function", new Object[]{"arg0"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void functionCallWithSequentialArgumentProcessingAndMultipleArguments() throws Exception {
    buildInstructionsFor("|function;|arg0|arg1|arg2|\n", false);
    List<CallInstruction> expectedInstructions =
      asList(
              new CallInstruction("scriptTable_id_0", "scriptTableActor", "function", new Object[]{"arg0", "arg1", "arg2"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void functionCallWithSequentialArgumentProcessingEmbedded() throws Exception {
    buildInstructionsFor("|set name|Marisa|department and title;|QA|Tester|\n", false);
    List<CallInstruction> expectedInstructions =
      asList(
              new CallInstruction("scriptTable_id_0", "scriptTableActor", "setNameDepartmentAndTitle", new Object[]{"Marisa", "QA", "Tester"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void functionCallWithSequentialArgumentProcessingEmbedded2() throws Exception {
    buildInstructionsFor("|set name|Marisa|department|QA|title and length of employment;|Tester|2 years|\n", false);
    List<CallInstruction> expectedInstructions =
      asList(
              new CallInstruction("scriptTable_id_0", "scriptTableActor", "setNameDepartmentTitleAndLengthOfEmployment", new Object[]{"Marisa", "QA", "Tester", "2 years"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

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

  @Test
  public void localizedCheckWithFunction() throws Exception {
    buildInstructionsFor("|localized check|function|arg|result|\n", true);
    List<CallInstruction> expectedInstructions =
      asList(
              new CallInstruction("localizedScriptTable_id_0", "localizedScriptTableActor", "function", new Object[]{"arg"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void checkNotWithFunction() throws Exception {
    buildInstructionsFor("|check not|function|arg|result|\n", false);
    List<CallInstruction> expectedInstructions =
      asList(
              new CallInstruction("scriptTable_id_0", "scriptTableActor", "function", new Object[]{"arg"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void localizedCheckNotWithFunction() throws Exception {
    buildInstructionsFor("|localized check not|function|arg|result|\n", true);
    List<CallInstruction> expectedInstructions =
      asList(
              new CallInstruction("localizedScriptTable_id_0", "localizedScriptTableActor", "function", new Object[]{"arg"})
      );
    assertEquals(expectedInstructions, instructions());
  }
View Full Code Here

  @Test
  public void checkWithFunctionAndTrailingName() throws Exception {
    buildInstructionsFor("|check|function|arg|trail|result|\n", false);
    List<CallInstruction> expectedInstructions =
      asList(
              new CallInstruction("scriptTable_id_0", "scriptTableActor", "functionTrail", new Object[]{"arg"})
      );
    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.