Package gherkin.lexer

Examples of gherkin.lexer.Lexer.scan()


    }

    public List<List<String>> transitionTable() {
        transitionTable = new ArrayList<List<String>>();
        Lexer lexer = new En(this);
        lexer.scan(FixJava.readResource(machinePath));
        return transitionTable;
    }

    public void tag(String tag, Integer line) {
    }
View Full Code Here


                "       World  \n" +
                "  Scenario Outline:\n" +
                "    Given I have an empty stack\n" +
                "    When I pøsh <x> onto the stack";

        lexer.scan(feature);

        verify(listener).feature("Feature", "Hello", "  Big    \n    World", 1);
        verify(listener).step("Given ", "I have an empty stack", 5);
        verify(listener).step("When ", "I pøsh <x> onto the stack", 6);
    }
View Full Code Here

                "\n" +
                "  Scenario Outline:\n" +
                "    Given I have an empty stack\n" +
                "    When I pøsh <x> onto the stack";

        lexer.scan(feature);

        verify(listener).feature("Feature", "ÆØÅ", "", 1);
        verify(listener).step("When ", "I pøsh <x> onto the stack", 5);
    }
View Full Code Here

        Listener listener = mock(Listener.class);
        Lexer lexer = new I18nLexer(listener);

        String feature = FixJava.readResource("/gherkin/utf8.feature");

        lexer.scan(feature);

        verify(listener).feature("Feature", "ÆØÅ", "", 1);
        verify(listener).step("When ", "I pøsh <x> onto the stack", 5);
    }
View Full Code Here

        String feature = "" +
                "Feature: F\n" +
                "  Scenario: S\n" +
                "    Given ";

        lexer.scan(feature);

        verify(listener).feature("Feature", "F", "", 1);
        verify(listener).scenario("Scenario", "S", "", 2);
        verify(listener).step("Given ", "", 3);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.