library/src/test/java/com/kdgregory/aws/utils/kinesis/TestKinesisWriter.java
/**
     *  Asserts that there's a logging message of a particular level that contains
     *  the expected text (specified as a regex).
     */
Asserts that there's a logging message of a particular level that contains
the expected text (specified as a regex).
Asserts that there ' s a logging message of a particular level that contains the expected text ( specified as a regex ) .
private void assertLogMessage(Level level, String expectedMessageRegex)
    {
        Pattern pattern = Pattern.compile(expectedMessageRegex);
        for (LoggingEvent event : loggingEvents)
        {
            if ((event.getLevel() == level) && pattern.matcher(event.getRenderedMessage().toString()).find())
                return;
        }
        fail("did not find \"" + expectedMessageRegex + "\" in logging events");
    }
private void assertLogMessage ( Level level , String expectedMessageRegex ) { Pattern pattern = Pattern . compile ( expectedMessageRegex ) ; for ( LoggingEvent event : loggingEvents ) { if ( ( event . getLevel ( ) == level ) && pattern . matcher ( event . getRenderedMessage ( ) . toString ( ) ) . find ( ) ) return ; } fail ( "did not find \"" + expectedMessageRegex + "\" in logging events" ) ; }
Asserts that there's a logging message of a particular level that contains
  the expected text (specified as a regex).
Asserts that there ' s a logging message of a particular level that contains the expected text ( specified as a regex ) .