Examples of StringCharReader


Examples of net.mindengine.galen.specs.reader.StringCharReader

        };
    }
   
    @Test(dataProvider = "provideBadRangeSamples")
    public void shouldGiveError_forIncorrectRanges(TestData<String> testData) {
        StringCharReader stringCharReader = new StringCharReader(testData.textForParsing);
       
        SyntaxException exception = null;
        try {
            new ExpectRange().read(stringCharReader);
        }
View Full Code Here

Examples of net.mindengine.galen.specs.reader.StringCharReader

    }
   
   
    @Test(dataProvider = "wordTestData")
    public void expectWord(TestData<String> testData) {
        StringCharReader stringCharReader = new StringCharReader(testData.textForParsing);
        String word = new ExpectWord().read(stringCharReader);
        assertThat(word, is(testData.expected));
    }
View Full Code Here

Examples of net.mindengine.galen.specs.reader.StringCharReader

        };
    }
   
    @Test(dataProvider="wordWithBreakingSymbolTestData")
    public void expectWordWithBreakingSymbol(String text, char breakingSymbol, String expectedWord) {
        StringCharReader stringCharReader = new StringCharReader(text);
        String word = new ExpectWord().stopOnTheseSymbols(breakingSymbol).read(stringCharReader);
        assertThat(word, is(expectedWord));
    }
View Full Code Here

Examples of net.mindengine.galen.specs.reader.StringCharReader

        };
    }
   
    @Test(dataProvider = "sideTestData")
    public void expectSides(TestData<List<Side>> testData) {
        StringCharReader stringCharReader = new StringCharReader(testData.textForParsing);
        List<Side> sides = new ExpectSides().read(stringCharReader);
       
        Side[] expected = testData.expected.toArray(new Side[testData.expected.size()]);
        assertThat(sides.size(), is(expected.length));
        assertThat(sides, contains(expected));
View Full Code Here

Examples of net.mindengine.galen.specs.reader.StringCharReader

        };
    }
   
    @Test(dataProvider = "locationsTestData")
    public void expectLocations(TestData<List<Location>> testData) {
        StringCharReader stringCharReader = new StringCharReader(testData.textForParsing);
        List<Location> sides = new ExpectLocations().read(stringCharReader);
       
        Location[] expected = testData.expected.toArray(new Location[testData.expected.size()]);
        assertThat(sides.size(), is(expected.length));
        assertThat(sides, contains(expected));
View Full Code Here

Examples of net.mindengine.galen.specs.reader.StringCharReader

        };
    }
   
    @Test(dataProvider = "provideBadLocations")
    public void shouldGiveError_forIncorrectLocations(String text, String expectedErrorMessage) {
        StringCharReader stringCharReader = new StringCharReader(text);
       
        SyntaxException exception = null;
        try {
            new ExpectLocations().read(stringCharReader);
        }
View Full Code Here

Examples of net.mindengine.galen.specs.reader.StringCharReader


    @Test
    public void shouldParse_commaSeparatedKeyValue() {
        String text = ",param1 1, param2 v a l u e 2, booleanParam, param3 2.3, param1 2";
        List<Pair<String, String>> params = new ExpectCommaSeparatedKeyValue().read(new StringCharReader(text));

        assertThat(params.size(), is(5));
        assertThat(params.get(0).getKey(), is("param1"));
        assertThat(params.get(0).getValue(), is("1"));
View Full Code Here

Examples of net.mindengine.galen.specs.reader.StringCharReader

    }

    @Test
    public void shouldParse_commaSeparatedKeyValue_2() {
        String text = "param1 1, param2 2";
        List<Pair<String, String>> params = new ExpectCommaSeparatedKeyValue().read(new StringCharReader(text));

        assertThat(params.size(), is(2));
        assertThat(params.get(0).getKey(), is("param1"));
        assertThat(params.get(0).getValue(), is("1"));
View Full Code Here

Examples of net.sf.kpex.builtins.StringCharReader

    // writable Sinks
    register(new TermStringCollector());
    register(new TermCollector());

    register(new StringCharReader());
    register(new StringClauseReader());

    // fluent controllers
    register(new Get());
    register(new Put());
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.