use of org.apache.commons.logging.Log in project netty by netty.
the class CommonsLoggerTest method testErrorWithException.
@Test
public void testErrorWithException() {
Log mockLog = mock(Log.class);
InternalLogger logger = new CommonsLogger(mockLog, "foo");
logger.error("a", e);
verify(mockLog).error("a", e);
}
use of org.apache.commons.logging.Log in project netty by netty.
the class CommonsLoggerTest method testIsWarnEnabled.
@Test
public void testIsWarnEnabled() {
Log mockLog = mock(Log.class);
when(mockLog.isWarnEnabled()).thenReturn(true);
InternalLogger logger = new CommonsLogger(mockLog, "foo");
assertTrue(logger.isWarnEnabled());
verify(mockLog).isWarnEnabled();
}
use of org.apache.commons.logging.Log in project netty by netty.
the class CommonsLoggerTest method testDebug.
@Test
public void testDebug() {
Log mockLog = mock(Log.class);
InternalLogger logger = new CommonsLogger(mockLog, "foo");
logger.debug("a");
verify(mockLog).debug("a");
}
use of org.apache.commons.logging.Log in project netty by netty.
the class CommonsLoggerTest method testTrace.
@Test
public void testTrace() {
Log mockLog = mock(Log.class);
InternalLogger logger = new CommonsLogger(mockLog, "foo");
logger.trace("a");
verify(mockLog).trace("a");
}
use of org.apache.commons.logging.Log in project netty by netty.
the class CommonsLoggerTest method testIsDebugEnabled.
@Test
public void testIsDebugEnabled() {
Log mockLog = mock(Log.class);
when(mockLog.isDebugEnabled()).thenReturn(true);
InternalLogger logger = new CommonsLogger(mockLog, "foo");
assertTrue(logger.isDebugEnabled());
verify(mockLog).isDebugEnabled();
}
Aggregations