Package org.hamcrest.text

Examples of org.hamcrest.text.StringContains


    }

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


    }

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

    public void testHandler() {
        AgentLoggerHandler handler = new AgentLoggerHandler();
        handler.setPrintStream(printStream);

        context.checking(new Expectations() {{
            oneOf(printStream).println(with(new StringContains("DEBUG (org.hotswap.agent.config.PluginManager) - A 1 B 2 C 3")));
        }});

        handler.print(PluginManager.class, AgentLogger.Level.DEBUG, "A {} B {} C {}", null, "1", 2, 3L);
    }
View Full Code Here

TOP

Related Classes of org.hamcrest.text.StringContains

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.