Package org.hamcrest.core

Examples of org.hamcrest.core.StringEndsWith


    }

    @Factory
    public static Matcher<String> endsWithStripNewLines(final String expected) {
        final String strippedExpected = StringExtensions.stripNewLines(expected);
        return new StringEndsWith(strippedExpected) {
            @Override
            public boolean matchesSafely(final String actual) {
                return super.matchesSafely(StringExtensions.stripNewLines(actual));
            }
View Full Code Here


    }

    @Factory
    public static Matcher<String> endsWithStripNewLines(final String expected) {
        final String strippedExpected = StringExtensions.stripNewLines(expected);
        return new StringEndsWith(strippedExpected) {
            @Override
            public boolean matchesSafely(final String actual) {
                return super.matchesSafely(StringExtensions.stripNewLines(actual));
            }
View Full Code Here

    }

    private static Collection<String> getClassesInPackage(String packageName, String sampleClass) {
        String sampleClassPathSuffix = sampleClass.replaceAll("\\.", "/") + ".class";
        String sampleClassPath = CheckParserUsagesDT.class.getClassLoader().getResource(sampleClassPathSuffix).getPath();
        assertThat(sampleClassPath, new StringEndsWith(sampleClassPathSuffix));
        String packagePath = sampleClassPath.substring(0,sampleClassPath.length()-sampleClassPathSuffix.length()) +
                packageName.replaceAll("\\.", "/");
        return getAllClassesInDirectory(new File(packagePath));
    }
View Full Code Here

TOP

Related Classes of org.hamcrest.core.StringEndsWith

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.