Package org.moresbycoffee.mbyhave8.hooks

Examples of org.moresbycoffee.mbyhave8.hooks.MByHave8Hooks


public class Feature_isExecutableTest {

    @Test
    public void should_be_true_if_there_are_scenarios_in_the_feature() {
        final Feature feature = featureWith(successScenario());
        assertTrue(feature.isExecutable(Filter.EMPTY_FILTER));
    }
View Full Code Here


        assertTrue(feature.isExecutable(Filter.EMPTY_FILTER));
    }

    @Test
    public void empty_feature_should_be_executable() {
        final Feature feature = featureWith();
        assertTrue(feature.isExecutable(Filter.EMPTY_FILTER));
    }
View Full Code Here

        assertTrue(feature.isExecutable(Filter.EMPTY_FILTER));
    }

    @Test
    public void feature_with_only_filtered_out_scenarios_should_not_be_executable() {
        final Feature feature = featureWith(successScenario().tag("Broken"));
        assertFalse(feature.isExecutable(new Filter("~Broken")));
    }
View Full Code Here

    private Specification specification = new Specification();
    //TODO replace announcer
    private final CallbackAnnouncer eventAnnouncer = new CallbackAnnouncer();

    protected final Feature Feature(final String description, final Scenario... scenarios) {
        final Feature feature = new Feature(description, scenarios);
        specification = specification.withAdditionalFeature(feature);
        return feature;
    }
View Full Code Here

        assertThat(scenario.getTags(), contains("tag1", "MBH-1", "MBH-2"));
    }

    @Test
    public void should_add_tag_to_feature() {
        final Feature feature = featureWith(successScenario());
        feature.tag("TEST TAG1");
        assertThat(feature.getTags(), contains("TEST TAG1"));
    }
View Full Code Here

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

    @Test
    public void should_add_all_tags_to_feature() {
        final Feature feature = featureWith(successScenario());
        feature.tag("TEST TAG1").tag("TEST TAG2");
        assertThat(feature.getTags(), contains("TEST TAG1", "TEST TAG2"));
    }
View Full Code Here

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

    @Test
    public void should_add_multiple_tags_to_feature() {
        final Feature feature = featureWith(successScenario());
        feature.tag("TEST TAG1", "TEST TAG2");
        assertThat(feature.getTags(), contains("TEST TAG1", "TEST TAG2"));
    }
View Full Code Here

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

    @Test
    public void should_trim_the_tags_on_feature() {
        final Feature feature = featureWith(successScenario());
        feature.tag("tag1   ", "   ", "   tag2", "tag3", null);
        assertThat(feature.getTags(), contains("tag1", "tag2", "tag3"));
    }
View Full Code Here

        assertThat(feature.getTags(), contains("tag1", "tag2", "tag3"));
    }

    @Test
    public void should_should_not_do_anything_with_null_tag_to_feature() {
        final Feature feature = featureWith(successScenario());
        feature.tag(null);
        assertTrue(feature.getTags().isEmpty());
    }
View Full Code Here

        assertTrue(feature.getTags().isEmpty());
    }

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

TOP

Related Classes of org.moresbycoffee.mbyhave8.hooks.MByHave8Hooks

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.