Package gherkin.lexer

Examples of gherkin.lexer.Listener


import static org.mockito.Mockito.verify;

public class I18nLexerTest {
    @Test
    public void shouldScanMultiLineFeature() {
        Listener listener = mock(Listener.class);
        Lexer lexer = new I18nLexer(listener);

        String feature = "" +
                " Feature: Hello\n" +
                "     Big    \n" +
View Full Code Here


        verify(listener).step("When ", "I pøsh <x> onto the stack", 6);
    }

    @Test
    public void shouldScanUtf8FeatureInSourceProperly() {
        Listener listener = mock(Listener.class);
        Lexer lexer = new I18nLexer(listener);

        String feature = "Feature: ÆØÅ\n" +
                "\n" +
                "  Scenario Outline:\n" +
View Full Code Here

        verify(listener).step("When ", "I pøsh <x> onto the stack", 5);
    }

    @Test
    public void shouldScanUtf8FeatureInFileProperly() throws UnsupportedEncodingException {
        Listener listener = mock(Listener.class);
        Lexer lexer = new I18nLexer(listener);

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

        lexer.scan(feature);
View Full Code Here

        verify(listener).step("When ", "I pøsh <x> onto the stack", 5);
    }

    @Test
    public void shouldScanStepWithEmptyName() {
        Listener listener = mock(Listener.class);
        Lexer lexer = new I18nLexer(listener);

        String feature = "" +
                "Feature: F\n" +
                "  Scenario: S\n" +
View Full Code Here

TOP

Related Classes of gherkin.lexer.Listener

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.