Package fitnesse.slim.instructions

Examples of fitnesse.slim.instructions.Instruction


      "|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


      "|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

    private List<SlimAssertion> callSetForVariables(int row) {
      List<SlimAssertion> assertions = new ArrayList<SlimAssertion>();
      for (String var : varStore.getLeftToRightAndResetColumnNumberIterator()) {
        int col = varStore.getColumnNumber(var);
        String valueToSet = table.getCellContents(col, row);
        Instruction setInstruction = new CallInstruction(makeInstructionTag(), getTableName(), "set", new Object[] {var, valueToSet});
        assertions.add(makeAssertion(setInstruction, new VoidReturnExpectation(col, row)));
      }
      return assertions;
    }
View Full Code Here

    return ("tableTable");
  }

  public List<SlimAssertion> getAssertions() {
    SlimAssertion make = constructFixture(getFixtureName());
    Instruction doTable = callFunction(getTableName(), "doTable", tableAsList());
    return Arrays.asList(make, makeAssertion(doTable, new TableTableExpectation()));
  }
View Full Code Here

      throw new SyntaxError("Import tables must have at least two rows.");

    for (int row = 1; row < rows; row++) {
      String importString = table.getCellContents(0, row);
      if (importString.length() > 0) {
        Instruction importInstruction = new ImportInstruction(makeInstructionTag(), importString);
        instructions.add(makeAssertion(importInstruction, new ImportExpectation(0, row)));
      }
    }
    return instructions;
  }
View Full Code Here

    private List<SlimAssertion> setVariables(int row) {
      List<SlimAssertion> assertions = new ArrayList<SlimAssertion>();
      for (String var : varStore.getLeftToRightAndResetColumnNumberIterator()) {
        int col = varStore.getColumnNumber(var);
        String valueToSet = table.getCellContents(col, row);
        Instruction setInstruction = new CallInstruction(makeInstructionTag(), getTableName(), Disgracer.disgraceMethodName("set " + var), new Object[] {valueToSet});
        assertions.add(makeAssertion(setInstruction,
                new VoidReturnExpectation(col, row)));
      }
      return assertions;
    }
View Full Code Here

          result.add(executeStatement(statement));
      return result;
    }

    public Object executeStatement(Object statement) {
      Instruction instruction = InstructionFactory.createInstruction(asStatementList(statement), methodNameTranslator);
      InstructionResult result = instruction.execute(executor);
      Object resultObject;
      if (result.hasResult() || result.hasError()) {
        resultObject = result.getResult();
      } else {
        resultObject = null;
      }
      return asList(instruction.getId(), resultObject);
    }
View Full Code Here

TOP

Related Classes of fitnesse.slim.instructions.Instruction

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.