library/src/test/java/com/kdgregory/aws/utils/kinesis/TestKinesisReader.java
/**
     *  Identifies all log messages that contain the specified text, and asserts
     *  their level.
     */
Identifies all log messages that contain the specified text, and asserts
their level.
Identifies all log messages that contain the specified text and asserts their level .
public void assertLogMessages(String message, String searchtext, int expectedCount, Level expectedLevel)
    {
        int actualCount = 0;
        for (LoggingEvent logEvent : loggingEvents)
        {
            if (logEvent.getRenderedMessage().contains(searchtext))
            {
                assertEquals(message + ": log level", expectedLevel, logEvent.getLevel());
                actualCount++;
            }
        }
        assertEquals(message + ": number of messages", expectedCount, actualCount);
    }
public void assertLogMessages ( String message , String searchtext , int expectedCount , Level expectedLevel ) { int actualCount = 0 ; for ( LoggingEvent logEvent : loggingEvents ) { if ( logEvent . getRenderedMessage ( ) . contains ( searchtext ) ) { assertEquals ( message + ": log level" , expectedLevel , logEvent . getLevel ( ) ) ; actualCount ++ ; } } assertEquals ( message + ": number of messages" , expectedCount , actualCount ) ; }
Identifies all log messages that contain the specified text, and asserts
  their level.
Identifies all log messages that contain the specified text and asserts their level .