Examples of MakeInstruction


Examples of fitnesse.slim.instructions.MakeInstruction

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

Examples of fitnesse.slim.instructions.MakeInstruction

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

Examples of fitnesse.slim.instructions.MakeInstruction

  @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

Examples of fitnesse.slim.instructions.MakeInstruction

  @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

Examples of fitnesse.slim.instructions.MakeInstruction

    return tableHeader.split(":")[1];
  }

  protected SlimAssertion constructInstance(String instanceName, String className, int classNameColumn, int row) {
    RowExpectation expectation = new ConstructionExpectation(classNameColumn, row);
    return makeAssertion(new MakeInstruction(makeInstructionTag(), instanceName, className, gatherConstructorArgumentsStartingAt(classNameColumn + 1, row)),
            expectation);
  }
View Full Code Here

Examples of fitnesse.slim.instructions.MakeInstruction

    statements.add(new CallInstruction(id, "testSlim", "echoInt", new Object[] { number }));
  }

  private void addImportAndMake() {
    statements.add(new ImportInstruction("i1", getImport()));
    statements.add(new MakeInstruction("m1", "testSlim", "TestSlim"));
  }
View Full Code Here

Examples of fitnesse.slim.instructions.MakeInstruction

        && result.contains(message));
  }

  @Test
  public void makeClassThatDoesntExist() throws Exception {
    statements.add(new MakeInstruction("m1", "me", "NoSuchClass"));
    Map<String, Object> results = slimClient.invokeAndGetResponse(statements);
    assertContainsException("message:<<COULD_NOT_INVOKE_CONSTRUCTOR", "m1", results);
  }
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.