Package org.moresbycoffee.mbyhave8.structure

Examples of org.moresbycoffee.mbyhave8.structure.Step


        assertThat(feature.getIssues(), contains("MBH-1", "MBH-2", "MBH-3"));
    }

    @Test
    public void should_add_issues_to_tags_as_well_on_a_feature() {
        final Feature feature = featureWith(successScenario());
        feature.tag("tag1").issue("MBH-1", "MBH-2");
        assertThat(feature.getTags(), contains("tag1", "MBH-1", "MBH-2"));
    }
View Full Code Here


    @Test
    public void the_secenario_callbacks_should_be_called_before_and_after_the_scenario() {
        final ScenarioHooks hooks = Mockito.mock(ScenarioHooks.class);
        final InOrder inOrder = Mockito.inOrder(hooks);

        final Scenario scenario = TestUtils.successScenario();

        scenario.execute(hooks);

        final ArgumentCaptor<Scenario> scenarioCaptor = ArgumentCaptor.forClass(Scenario.class);
        inOrder.verify(hooks).startScenario(scenarioCaptor.capture());
        inOrder.verify(hooks).endScenario(Mockito.eq(scenarioCaptor.getValue()), Mockito.eq(ScenarioResult.Success));
View Full Code Here

        specification = specification.withAdditionalFeature(feature);
        return feature;
    }

    protected final Scenario Scenario(final String description, final Step... steps) {
        return new Scenario(description, steps);
    }
View Full Code Here

@SuppressWarnings("all")
public class AddTagTest {

    @Test
    public void should_add_tag_to_scenario() {
        final Scenario scenario = successScenario();
        scenario.tag("TEST TAG1");
        assertThat(scenario.getTags(), contains("TEST TAG1"));
    }
View Full Code Here

        assertThat(scenario.getTags(), contains("TEST TAG1"));
    }

    @Test
    public void should_add_all_tags_to_scenario() {
        final Scenario scenario = successScenario();
        scenario.tag("TEST TAG1").tag("TEST TAG2");
        assertThat(scenario.getTags(), contains("TEST TAG1", "TEST TAG2"));
    }
View Full Code Here

        assertThat(scenario.getTags(), contains("TEST TAG1", "TEST TAG2"));
    }

    @Test
    public void should_add_multiple_tags_to_scenario() {
        final Scenario scenario = successScenario();
        scenario.tag("TEST TAG1", "TEST TAG2");
        assertThat(scenario.getTags(), contains("TEST TAG1", "TEST TAG2"));
    }
View Full Code Here

        assertThat(scenario.getTags(), contains("TEST TAG1", "TEST TAG2"));
    }

    @Test
    public void should_trim_the_tags_on_scenarios() {
        final Scenario scenario = successScenario();
        scenario.tag("tag1   ", "   ", "   tag2", "tag3", null);
        assertThat(scenario.getTags(), contains("tag1", "tag2", "tag3"));
    }
View Full Code Here

public class Specification_isExecutableTest {

    @Test
    public void should_be_true_if_there_are_features_in_the_specification() {
        final Specification specification = specificationWith(featureWith(successScenario()));
        assertTrue(specification.isExecuteable(Filter.EMPTY_FILTER));
    }
View Full Code Here

        assertTrue(specification.isExecuteable(Filter.EMPTY_FILTER));
    }

    @Test
    public void empty_specification_should_be_executable() {
        final Specification specification = specificationWith();
        assertTrue(specification.isExecuteable(Filter.EMPTY_FILTER));
    }
View Full Code Here

        assertTrue(specification.isExecuteable(Filter.EMPTY_FILTER));
    }

    @Test
    public void specification_with_only_filtered_out_features_should_not_be_executable() {
        final Specification specification = specificationWith(featureWith(successScenario()).tag("Broken"));
        assertFalse(specification.isExecuteable(new Filter("~Broken")));

    }
View Full Code Here

TOP

Related Classes of org.moresbycoffee.mbyhave8.structure.Step

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.