Search in sources :

Example 31 with Pickle

use of io.cucumber.core.gherkin.Pickle in project cucumber-jvm by cucumber.

the class TagPredicateTest method or_tag_predicate_matches_pickle_with_one_of_the_tags.

@Test
void or_tag_predicate_matches_pickle_with_one_of_the_tags() {
    Pickle pickle = createPickleWithTags("@FOO");
    TagPredicate predicate = createPredicate("@FOO or @BAR");
    assertTrue(predicate.test(pickle));
}
Also used : Pickle(io.cucumber.core.gherkin.Pickle) Test(org.junit.jupiter.api.Test)

Example 32 with Pickle

use of io.cucumber.core.gherkin.Pickle in project cucumber-jvm by cucumber.

the class TagPredicateTest method and_tag_predicate_does_not_match_pickle_with_one_of_the_tags.

@Test
void and_tag_predicate_does_not_match_pickle_with_one_of_the_tags() {
    Pickle pickle = createPickleWithTags("@FOO");
    TagPredicate predicate = createPredicate("@FOO and @BAR");
    assertFalse(predicate.test(pickle));
}
Also used : Pickle(io.cucumber.core.gherkin.Pickle) Test(org.junit.jupiter.api.Test)

Example 33 with Pickle

use of io.cucumber.core.gherkin.Pickle in project cucumber-jvm by cucumber.

the class TagPredicateTest method empty_tag_predicate_matches_pickle_with_any_tags.

@Test
void empty_tag_predicate_matches_pickle_with_any_tags() {
    Pickle pickle = createPickleWithTags("@FOO");
    TagPredicate predicate = createPredicate("");
    assertTrue(predicate.test(pickle));
}
Also used : Pickle(io.cucumber.core.gherkin.Pickle) Test(org.junit.jupiter.api.Test)

Example 34 with Pickle

use of io.cucumber.core.gherkin.Pickle in project cucumber-jvm by cucumber.

the class TagPredicateTest method list_of_empty_tag_predicates_matches_pickle_with_any_tags.

@Test
void list_of_empty_tag_predicates_matches_pickle_with_any_tags() {
    Pickle pickle = createPickleWithTags("@FOO");
    TagPredicate predicate = createPredicate("", "");
    assertTrue(predicate.test(pickle));
}
Also used : Pickle(io.cucumber.core.gherkin.Pickle) Test(org.junit.jupiter.api.Test)

Example 35 with Pickle

use of io.cucumber.core.gherkin.Pickle in project cucumber-jvm by cucumber.

the class TagPredicateTest method single_tag_predicate_does_not_match_pickle_with_no_tags.

@Test
void single_tag_predicate_does_not_match_pickle_with_no_tags() {
    Pickle pickle = createPickleWithTags();
    TagPredicate predicate = createPredicate("@FOO");
    assertFalse(predicate.test(pickle));
}
Also used : Pickle(io.cucumber.core.gherkin.Pickle) Test(org.junit.jupiter.api.Test)

Aggregations

Pickle (io.cucumber.core.gherkin.Pickle)39 Test (org.junit.jupiter.api.Test)37 PickleRunner (io.cucumber.junit.PickleRunners.PickleRunner)6 Collections.singletonList (java.util.Collections.singletonList)6 List (java.util.List)6 Glue (io.cucumber.core.backend.Glue)5 Collections.emptyList (java.util.Collections.emptyList)5 Feature (io.cucumber.core.gherkin.Feature)4 URI (java.net.URI)4 HookDefinition (io.cucumber.core.backend.HookDefinition)3 StaticHookDefinition (io.cucumber.core.backend.StaticHookDefinition)3 Step (io.cucumber.core.gherkin.Step)3 InOrder (org.mockito.InOrder)3 Location (io.cucumber.plugin.event.Location)2 DataTableArgument (io.cucumber.core.gherkin.DataTableArgument)1 FeatureParser (io.cucumber.core.gherkin.FeatureParser)1 FeatureParserException (io.cucumber.core.gherkin.FeatureParserException)1 RuntimeOptions (io.cucumber.core.options.RuntimeOptions)1 RuntimeOptionsBuilder (io.cucumber.core.options.RuntimeOptionsBuilder)1 Gherkin (io.cucumber.gherkin.Gherkin)1