Package gherkin.formatter.model

Examples of gherkin.formatter.model.Tag


        stash.comment(new Comment(comment, line));
    }

    @Override
    public void tag(String tag, Integer line) {
        stash.tag(new Tag(tag, line));
    }
View Full Code Here


public class TagExpressionTest {
    @Test
    public void notFooShouldMatchBar() {
        TagExpression e = new TagExpression(Collections.singletonList("~@foo"));
        assertTrue(e.evaluate(Collections.singletonList(new Tag("@bar", 1))));
    }
View Full Code Here

    }

    @Test
    public void notFooShouldNotMatchFoo() {
        TagExpression e = new TagExpression(Collections.singletonList("~@foo"));
        assertFalse(e.evaluate(Collections.singletonList(new Tag("@foo", 1))));
    }
View Full Code Here

    public void filterFormatterShouldNotClearExampleTags() {

        FilterFormatter filterFormatter =  new FilterFormatter(mock(Formatter.class), Arrays.asList("@filter"));

        final ArrayList<Tag> originalTags = new ArrayList<Tag>();
        originalTags.add(new Tag("@tag", 0));

        Examples examples1 = new Examples(Collections.EMPTY_LIST, new ArrayList<Tag>(originalTags),
                "keyword1", "name1", "description1", 0, "id1", Collections.EMPTY_LIST);
        Examples examples2 = new Examples(Collections.EMPTY_LIST, new ArrayList<Tag>(originalTags),
                "keyword2", "name2", "description2", 0, "id2", Collections.EMPTY_LIST);
View Full Code Here

    private List<Tag> tags(Map o) {
        List<Tag> tags = new ArrayList<Tag>();
        if (o.containsKey("tags")) {
            for (Object e : ((List) o.get("tags"))) {
                Map map = (Map) e;
                tags.add(new Tag(getString(map, "name"), getInt(map, "line")));
            }
        }
        return tags;
    }
View Full Code Here

TOP

Related Classes of gherkin.formatter.model.Tag

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.