Examples of ExamplesTable


Examples of org.jbehave.core.model.ExamplesTable

        ParameterConverter converter = new MethodReturningConverter(method, new SomeSteps());
        assertThat(converter.accept(method.getReturnType()), is(true));
        assertThat(converter.accept(WrongType.class), is(false));
        assertThat(converter.accept(mock(Type.class)), is(false));
        String value = "|col1|col2|\n|row11|row12|\n|row21|row22|\n";
        ExamplesTable table = (ExamplesTable) converter.convertValue(value, ExamplesTable.class);
        assertThat(table.getRowCount(), equalTo(2));
        Map<String, String> row1 = table.getRow(0);
        assertThat(row1.get("col1"), equalTo("row11"));
        assertThat(row1.get("col2"), equalTo("row12"));
        Map<String, String> row2 = table.getRow(1);
        assertThat(row2.get("col1"), equalTo("row21"));
        assertThat(row2.get("col2"), equalTo("row22"));
    }
View Full Code Here

Examples of org.jbehave.core.model.ExamplesTable

    @BeforeClass
    public void setUp() {
        webAppSteps.createApp();
        String workingDirectory = System.getProperty("user.dir");
        this.credentialsTable = new ExamplesTable(Utils.createStringFromJBehaveTable(workingDirectory + "/src/main/stories/users.table"));
    }
View Full Code Here

Examples of org.jbehave.core.model.ExamplesTable

    @BeforeClass
    public void setUp() {
        webAppSteps.createApp();
        String workingDirectory = System.getProperty("user.dir");
        this.credentialsTable = new ExamplesTable(Utils.createStringFromJBehaveTable(workingDirectory + "/src/main/stories/users.table"));
    }
View Full Code Here

Examples of org.jbehave.core.model.ExamplesTable


    @BeforeClass
    public void beforeStory() throws Exception {
        String workingDirectory = System.getProperty("user.dir");
        falsePositives = new ExamplesTable(Utils.createStringFromJBehaveTable(workingDirectory + "/src/main/stories/tables/false_positives.table"));
    }
View Full Code Here

Examples of org.jbehave.core.model.ExamplesTable

    @BeforeClass
    public void setUp() {
        webAppSteps.createApp();
        String workingDirectory = System.getProperty("user.dir");
        this.credentialsTable = new ExamplesTable(Utils.createStringFromJBehaveTable(workingDirectory + "/src/main/stories/users.table"));
        this.authorisedTable = Utils.createListOfMaps(workingDirectory + "/src/main/stories/tables/authorised.resources.table");
    }
View Full Code Here

Examples of org.jbehave.core.model.ExamplesTable

    return isParameterized(scenario)
        && !parameterNeededForGivenStories(scenario);
  }

  private boolean isParameterized(Scenario scenario) {
    ExamplesTable examplesTable = scenario.getExamplesTable();
    boolean isParameterized1 = examplesTable != null
        && examplesTable.getRowCount() > 0;
    return isParameterized1;
  }
View Full Code Here

Examples of org.jbehave.core.model.ExamplesTable

        "#")[0];
  }

  private void insertDescriptionForExamples(Scenario scenario,
      Description scenarioDescription) {
    ExamplesTable examplesTable = scenario.getExamplesTable();
    List<Map<String, String>> rows = examplesTable.getRows();
    for (Map<String, String> row : rows) {
      Description exampleRowDescription = Description
          .createSuiteDescription(
              configuration.keywords().examplesTableRow() + " " + row,
              (Annotation[]) null);
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.