Examples of valueAs()


Examples of org.jbehave.core.steps.Parameters.valueAs()

        // Then
        Parameters firstRow = examplesTable.getRowAsParameters(0);
        Map<String, String> firstRowValues = firstRow.values();
        assertThat(firstRowValues.containsKey("one"), is(true));
        assertThat(firstRow.valueAs("one", String.class), is("11"));
        assertThat(firstRow.valueAs("one", Integer.class), is(11));
        assertThat(firstRowValues.containsKey("three"), is(true));
        assertThat(firstRow.valueAs("three", String.class), is("99"));
        assertThat(firstRow.valueAs("three", Integer.class), is(99));
        assertThat(firstRowValues.containsKey("XX"), is(false));
        assertThat(firstRow.valueAs("XX", Integer.class, 13), is(13));
View Full Code Here

Examples of org.jbehave.core.steps.Parameters.valueAs()

        Map<String, String> firstRowValues = firstRow.values();
        assertThat(firstRowValues.containsKey("one"), is(true));
        assertThat(firstRow.valueAs("one", String.class), is("11"));
        assertThat(firstRow.valueAs("one", Integer.class), is(11));
        assertThat(firstRowValues.containsKey("three"), is(true));
        assertThat(firstRow.valueAs("three", String.class), is("99"));
        assertThat(firstRow.valueAs("three", Integer.class), is(99));
        assertThat(firstRowValues.containsKey("XX"), is(false));
        assertThat(firstRow.valueAs("XX", Integer.class, 13), is(13));

        Parameters secondRow = examplesTable.getRowAsParameters(1);
View Full Code Here

Examples of org.jbehave.core.steps.Parameters.valueAs()

        assertThat(firstRowValues.containsKey("one"), is(true));
        assertThat(firstRow.valueAs("one", String.class), is("11"));
        assertThat(firstRow.valueAs("one", Integer.class), is(11));
        assertThat(firstRowValues.containsKey("three"), is(true));
        assertThat(firstRow.valueAs("three", String.class), is("99"));
        assertThat(firstRow.valueAs("three", Integer.class), is(99));
        assertThat(firstRowValues.containsKey("XX"), is(false));
        assertThat(firstRow.valueAs("XX", Integer.class, 13), is(13));

        Parameters secondRow = examplesTable.getRowAsParameters(1);
        Map<String, String> secondRowValues = secondRow.values();
View Full Code Here

Examples of org.jbehave.core.steps.Parameters.valueAs()

        assertThat(firstRow.valueAs("one", Integer.class), is(11));
        assertThat(firstRowValues.containsKey("three"), is(true));
        assertThat(firstRow.valueAs("three", String.class), is("99"));
        assertThat(firstRow.valueAs("three", Integer.class), is(99));
        assertThat(firstRowValues.containsKey("XX"), is(false));
        assertThat(firstRow.valueAs("XX", Integer.class, 13), is(13));

        Parameters secondRow = examplesTable.getRowAsParameters(1);
        Map<String, String> secondRowValues = secondRow.values();
        assertThat(secondRowValues.containsKey("one"), is(true));
        assertThat(secondRow.valueAs("one", String.class), is("22"));
View Full Code Here

Examples of org.jbehave.core.steps.Parameters.valueAs()

        assertThat(firstRow.valueAs("XX", Integer.class, 13), is(13));

        Parameters secondRow = examplesTable.getRowAsParameters(1);
        Map<String, String> secondRowValues = secondRow.values();
        assertThat(secondRowValues.containsKey("one"), is(true));
        assertThat(secondRow.valueAs("one", String.class), is("22"));
        assertThat(secondRow.valueAs("one", Integer.class), is(22));
        assertThat(secondRowValues.containsKey("three"), is(true));
        assertThat(secondRow.valueAs("three", String.class), is("99"));
        assertThat(secondRow.valueAs("three", Integer.class), is(99));
        assertThat(secondRowValues.containsKey("XX"), is(false));
View Full Code Here

Examples of org.jbehave.core.steps.Parameters.valueAs()

        Parameters secondRow = examplesTable.getRowAsParameters(1);
        Map<String, String> secondRowValues = secondRow.values();
        assertThat(secondRowValues.containsKey("one"), is(true));
        assertThat(secondRow.valueAs("one", String.class), is("22"));
        assertThat(secondRow.valueAs("one", Integer.class), is(22));
        assertThat(secondRowValues.containsKey("three"), is(true));
        assertThat(secondRow.valueAs("three", String.class), is("99"));
        assertThat(secondRow.valueAs("three", Integer.class), is(99));
        assertThat(secondRowValues.containsKey("XX"), is(false));
        assertThat(secondRow.valueAs("XX", Integer.class, 13), is(13));
View Full Code Here

Examples of org.jbehave.core.steps.Parameters.valueAs()

        Map<String, String> secondRowValues = secondRow.values();
        assertThat(secondRowValues.containsKey("one"), is(true));
        assertThat(secondRow.valueAs("one", String.class), is("22"));
        assertThat(secondRow.valueAs("one", Integer.class), is(22));
        assertThat(secondRowValues.containsKey("three"), is(true));
        assertThat(secondRow.valueAs("three", String.class), is("99"));
        assertThat(secondRow.valueAs("three", Integer.class), is(99));
        assertThat(secondRowValues.containsKey("XX"), is(false));
        assertThat(secondRow.valueAs("XX", Integer.class, 13), is(13));

    }
View Full Code Here

Examples of org.jbehave.core.steps.Parameters.valueAs()

        assertThat(secondRowValues.containsKey("one"), is(true));
        assertThat(secondRow.valueAs("one", String.class), is("22"));
        assertThat(secondRow.valueAs("one", Integer.class), is(22));
        assertThat(secondRowValues.containsKey("three"), is(true));
        assertThat(secondRow.valueAs("three", String.class), is("99"));
        assertThat(secondRow.valueAs("three", Integer.class), is(99));
        assertThat(secondRowValues.containsKey("XX"), is(false));
        assertThat(secondRow.valueAs("XX", Integer.class, 13), is(13));

    }
View Full Code Here

Examples of org.jbehave.core.steps.Parameters.valueAs()

        assertThat(secondRow.valueAs("one", Integer.class), is(22));
        assertThat(secondRowValues.containsKey("three"), is(true));
        assertThat(secondRow.valueAs("three", String.class), is("99"));
        assertThat(secondRow.valueAs("three", Integer.class), is(99));
        assertThat(secondRowValues.containsKey("XX"), is(false));
        assertThat(secondRow.valueAs("XX", Integer.class, 13), is(13));

    }

    @Test
    public void shouldReplaceNamedParameterValues() throws Exception {
View Full Code Here

Examples of org.jbehave.core.steps.Parameters.valueAs()

        // Then
        Parameters firstRow = table.getRowsAsParameters(true).get(0);
        Map<String, String> firstRowValues = firstRow.values();
        assertThat(firstRowValues.containsKey("Value"), is(true));
        assertThat(firstRow.valueAs("Value", String.class), is("value1"));

    }

    @Test
    public void shouldMapParametersToType() throws Exception {
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.