import java.util.Map;
import java.util.Properties;
import java.util.stream.Stream;
+import org.assertj.core.groups.Tuple;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Rule;
java.util.logging.Logger logger = java.util.logging.Logger.getLogger("com.ms.sqlserver.jdbc.DTV");
logger.finest("Test");
memoryAppender.stop();
- assertThat(memoryAppender.getLogs()).hasSize(1);
+ assertThat(memoryAppender.getLogs())
+ .filteredOn(ILoggingEvent::getLoggerName, "com.ms.sqlserver.jdbc.DTV")
+ .extracting(ILoggingEvent::getLevel, ILoggingEvent::getMessage)
+ .containsOnly(new Tuple(Level.TRACE, "Test"));
}
@Test