Search in sources :

Example 6 with Pickle

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

the class TagPredicateTest method not_tag_predicate_matches_pickle_with_different_single_tag.

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

Example 7 with Pickle

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

the class TagPredicateTest method single_tag_predicate_matches_pickle_with_same_single_tag.

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

Example 8 with Pickle

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

the class TagPredicateTest method not_tag_predicate_does_not_match_pickle_with_same_single_tag.

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

Example 9 with Pickle

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

the class TagPredicateTest method or_tag_predicate_does_not_match_pickle_none_of_the_tags.

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

Example 10 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_different_single_tag.

@Test
void single_tag_predicate_does_not_match_pickle_with_different_single_tag() {
    Pickle pickle = createPickleWithTags("@BAR");
    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