Remove unnecessary qualifiers
This commit is contained in:
parent
8e0437e3e6
commit
a76cdc26d0
@ -57,7 +57,7 @@ import org.jboss.netty.handler.ssl.SslHandler;
|
|||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
class HttpTunnelingClientSocketChannel extends AbstractChannel
|
class HttpTunnelingClientSocketChannel extends AbstractChannel
|
||||||
implements org.jboss.netty.channel.socket.SocketChannel {
|
implements SocketChannel {
|
||||||
|
|
||||||
final HttpTunnelingSocketChannelConfig config;
|
final HttpTunnelingSocketChannelConfig config;
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ class HttpTunnelingClientSocketChannel extends AbstractChannel
|
|||||||
|
|
||||||
final SocketChannel realChannel;
|
final SocketChannel realChannel;
|
||||||
|
|
||||||
private final HttpTunnelingClientSocketChannel.ServletChannelHandler handler = new ServletChannelHandler();
|
private final ServletChannelHandler handler = new ServletChannelHandler();
|
||||||
|
|
||||||
HttpTunnelingClientSocketChannel(
|
HttpTunnelingClientSocketChannel(
|
||||||
ChannelFactory factory,
|
ChannelFactory factory,
|
||||||
|
@ -191,7 +191,7 @@ class NioClientSocketPipelineSink extends AbstractNioChannelSink {
|
|||||||
// when the selector is closed before this is run
|
// when the selector is closed before this is run
|
||||||
//
|
//
|
||||||
// See https://github.com/netty/netty/issues/685
|
// See https://github.com/netty/netty/issues/685
|
||||||
Selector selector = NioClientSocketPipelineSink.Boss.this.selector;
|
Selector selector = Boss.this.selector;
|
||||||
|
|
||||||
if (selector != null) {
|
if (selector != null) {
|
||||||
if (wakenUp.compareAndSet(false, true)) {
|
if (wakenUp.compareAndSet(false, true)) {
|
||||||
|
@ -15,7 +15,20 @@
|
|||||||
*/
|
*/
|
||||||
package org.jboss.netty.channel.socket.nio;
|
package org.jboss.netty.channel.socket.nio;
|
||||||
|
|
||||||
import static org.jboss.netty.channel.Channels.*;
|
import org.jboss.netty.channel.Channel;
|
||||||
|
import org.jboss.netty.channel.ChannelEvent;
|
||||||
|
import org.jboss.netty.channel.ChannelException;
|
||||||
|
import org.jboss.netty.channel.ChannelFuture;
|
||||||
|
import org.jboss.netty.channel.ChannelPipeline;
|
||||||
|
import org.jboss.netty.channel.ChannelState;
|
||||||
|
import org.jboss.netty.channel.ChannelStateEvent;
|
||||||
|
import org.jboss.netty.channel.MessageEvent;
|
||||||
|
import org.jboss.netty.logging.InternalLogger;
|
||||||
|
import org.jboss.netty.logging.InternalLoggerFactory;
|
||||||
|
import org.jboss.netty.util.ExternalResourceReleasable;
|
||||||
|
import org.jboss.netty.util.ThreadRenamingRunnable;
|
||||||
|
import org.jboss.netty.util.internal.DeadLockProofWorker;
|
||||||
|
import org.jboss.netty.util.internal.ExecutorUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.SocketAddress;
|
import java.net.SocketAddress;
|
||||||
@ -35,20 +48,7 @@ import java.util.concurrent.RejectedExecutionException;
|
|||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
import org.jboss.netty.channel.Channel;
|
import static org.jboss.netty.channel.Channels.*;
|
||||||
import org.jboss.netty.channel.ChannelEvent;
|
|
||||||
import org.jboss.netty.channel.ChannelException;
|
|
||||||
import org.jboss.netty.channel.ChannelFuture;
|
|
||||||
import org.jboss.netty.channel.ChannelPipeline;
|
|
||||||
import org.jboss.netty.channel.ChannelState;
|
|
||||||
import org.jboss.netty.channel.ChannelStateEvent;
|
|
||||||
import org.jboss.netty.channel.MessageEvent;
|
|
||||||
import org.jboss.netty.logging.InternalLogger;
|
|
||||||
import org.jboss.netty.logging.InternalLoggerFactory;
|
|
||||||
import org.jboss.netty.util.ExternalResourceReleasable;
|
|
||||||
import org.jboss.netty.util.ThreadRenamingRunnable;
|
|
||||||
import org.jboss.netty.util.internal.DeadLockProofWorker;
|
|
||||||
import org.jboss.netty.util.internal.ExecutorUtil;
|
|
||||||
|
|
||||||
class NioServerSocketPipelineSink extends AbstractNioChannelSink implements ExternalResourceReleasable {
|
class NioServerSocketPipelineSink extends AbstractNioChannelSink implements ExternalResourceReleasable {
|
||||||
|
|
||||||
@ -65,9 +65,9 @@ class NioServerSocketPipelineSink extends AbstractNioChannelSink implements Exte
|
|||||||
|
|
||||||
NioServerSocketPipelineSink(Executor bossExecutor, int bossCount, WorkerPool<NioWorker> workerPool) {
|
NioServerSocketPipelineSink(Executor bossExecutor, int bossCount, WorkerPool<NioWorker> workerPool) {
|
||||||
this.workerPool = workerPool;
|
this.workerPool = workerPool;
|
||||||
this.bosses = new Boss[bossCount];
|
bosses = new Boss[bossCount];
|
||||||
for (int i = 0; i < bossCount; i++) {
|
for (int i = 0; i < bossCount; i++) {
|
||||||
this.bosses[i] = new Boss(bossExecutor);
|
bosses[i] = new Boss(bossExecutor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,7 +343,7 @@ class NioServerSocketPipelineSink extends AbstractNioChannelSink implements Exte
|
|||||||
logger.warn(
|
logger.warn(
|
||||||
"Failed to close a selector.", e);
|
"Failed to close a selector.", e);
|
||||||
} finally {
|
} finally {
|
||||||
this.selector = null;
|
selector = null;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
@ -17,6 +17,8 @@ package org.jboss.netty.channel.socket.nio;
|
|||||||
|
|
||||||
import org.jboss.netty.channel.socket.InternetProtocolFamily;
|
import org.jboss.netty.channel.socket.InternetProtocolFamily;
|
||||||
|
|
||||||
|
import java.net.ProtocolFamily;
|
||||||
|
import java.net.StandardProtocolFamily;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -33,13 +35,13 @@ final class ProtocolFamilyConverter {
|
|||||||
/**
|
/**
|
||||||
* Convert the {@link InternetProtocolFamily}. This MUST only be called on jdk version >= 7.
|
* Convert the {@link InternetProtocolFamily}. This MUST only be called on jdk version >= 7.
|
||||||
*/
|
*/
|
||||||
public static java.net.ProtocolFamily convert(InternetProtocolFamily family) {
|
public static ProtocolFamily convert(InternetProtocolFamily family) {
|
||||||
switch (family) {
|
switch (family) {
|
||||||
case IPv4:
|
case IPv4:
|
||||||
return java.net.StandardProtocolFamily.INET;
|
return StandardProtocolFamily.INET;
|
||||||
|
|
||||||
case IPv6:
|
case IPv6:
|
||||||
return java.net.StandardProtocolFamily.INET6;
|
return StandardProtocolFamily.INET6;
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ package org.jboss.netty.handler.codec.http.websocketx;
|
|||||||
import org.jboss.netty.channel.Channel;
|
import org.jboss.netty.channel.Channel;
|
||||||
import org.jboss.netty.channel.ChannelFuture;
|
import org.jboss.netty.channel.ChannelFuture;
|
||||||
import org.jboss.netty.channel.ChannelFutureListener;
|
import org.jboss.netty.channel.ChannelFutureListener;
|
||||||
|
import org.jboss.netty.channel.ChannelHandlerContext;
|
||||||
import org.jboss.netty.channel.Channels;
|
import org.jboss.netty.channel.Channels;
|
||||||
import org.jboss.netty.handler.codec.http.HttpRequest;
|
import org.jboss.netty.handler.codec.http.HttpRequest;
|
||||||
import org.jboss.netty.util.internal.StringUtil;
|
import org.jboss.netty.util.internal.StringUtil;
|
||||||
@ -43,7 +44,7 @@ public abstract class WebSocketServerHandshaker {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link ChannelFutureListener} which will call
|
* {@link ChannelFutureListener} which will call
|
||||||
* {@link Channels#fireExceptionCaught(org.jboss.netty.channel.ChannelHandlerContext, Throwable)}
|
* {@link Channels#fireExceptionCaught(ChannelHandlerContext, Throwable)}
|
||||||
* if the {@link ChannelFuture} was not successful.
|
* if the {@link ChannelFuture} was not successful.
|
||||||
*/
|
*/
|
||||||
public static final ChannelFutureListener HANDSHAKE_LISTENER = new ChannelFutureListener() {
|
public static final ChannelFutureListener HANDSHAKE_LISTENER = new ChannelFutureListener() {
|
||||||
|
@ -36,7 +36,7 @@ import com.google.protobuf.CodedInputStream;
|
|||||||
* +--------+---------------+ +---------------+
|
* +--------+---------------+ +---------------+
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @see com.google.protobuf.CodedInputStream
|
* @see CodedInputStream
|
||||||
*/
|
*/
|
||||||
public class ProtobufVarint32FrameDecoder extends FrameDecoder {
|
public class ProtobufVarint32FrameDecoder extends FrameDecoder {
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ import com.google.protobuf.CodedOutputStream;
|
|||||||
* +---------------+ +--------+---------------+
|
* +---------------+ +--------+---------------+
|
||||||
* </pre> *
|
* </pre> *
|
||||||
*
|
*
|
||||||
* @see com.google.protobuf.CodedOutputStream
|
* @see CodedOutputStream
|
||||||
*/
|
*/
|
||||||
@Sharable
|
@Sharable
|
||||||
public class ProtobufVarint32LengthFieldPrepender extends OneToOneEncoder {
|
public class ProtobufVarint32LengthFieldPrepender extends OneToOneEncoder {
|
||||||
|
@ -18,6 +18,7 @@ package org.jboss.netty.handler.stream;
|
|||||||
import static org.jboss.netty.channel.Channels.*;
|
import static org.jboss.netty.channel.Channels.*;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.lang.OutOfMemoryError;
|
||||||
import java.nio.channels.ClosedChannelException;
|
import java.nio.channels.ClosedChannelException;
|
||||||
import java.util.Queue;
|
import java.util.Queue;
|
||||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||||
@ -42,7 +43,7 @@ import org.jboss.netty.logging.InternalLoggerFactory;
|
|||||||
/**
|
/**
|
||||||
* A {@link ChannelHandler} that adds support for writing a large data stream
|
* A {@link ChannelHandler} that adds support for writing a large data stream
|
||||||
* asynchronously neither spending a lot of memory nor getting
|
* asynchronously neither spending a lot of memory nor getting
|
||||||
* {@link java.lang.OutOfMemoryError}. Large data streaming such as file
|
* {@link OutOfMemoryError}. Large data streaming such as file
|
||||||
* transfer requires complicated state management in a {@link ChannelHandler}
|
* transfer requires complicated state management in a {@link ChannelHandler}
|
||||||
* implementation. {@link ChunkedWriteHandler} manages such complicated states
|
* implementation. {@link ChunkedWriteHandler} manages such complicated states
|
||||||
* so that you can send a large data stream without difficulties.
|
* so that you can send a large data stream without difficulties.
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
package org.jboss.netty.logging;
|
package org.jboss.netty.logging;
|
||||||
|
|
||||||
|
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logger factory which creates an
|
* Logger factory which creates an
|
||||||
@ -26,8 +28,8 @@ public class CommonsLoggerFactory extends InternalLoggerFactory {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InternalLogger newInstance(String name) {
|
public InternalLogger newInstance(String name) {
|
||||||
final org.apache.commons.logging.Log logger =
|
final Log logger =
|
||||||
org.apache.commons.logging.LogFactory.getLog(name);
|
LogFactory.getLog(name);
|
||||||
return new CommonsLogger(logger, name);
|
return new CommonsLogger(logger, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
package org.jboss.netty.logging;
|
package org.jboss.netty.logging;
|
||||||
|
|
||||||
|
|
||||||
|
import org.jboss.logging.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logger factory which creates a
|
* Logger factory which creates a
|
||||||
@ -26,8 +27,8 @@ public class JBossLoggerFactory extends InternalLoggerFactory {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InternalLogger newInstance(String name) {
|
public InternalLogger newInstance(String name) {
|
||||||
final org.jboss.logging.Logger logger =
|
final Logger logger =
|
||||||
org.jboss.logging.Logger.getLogger(name);
|
Logger.getLogger(name);
|
||||||
return new JBossLogger(logger);
|
return new JBossLogger(logger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
package org.jboss.netty.logging;
|
package org.jboss.netty.logging;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logger factory which creates a
|
* Logger factory which creates a
|
||||||
* <a href="http://java.sun.com/javase/6/docs/technotes/guides/logging/index.html">java.util.logging</a>
|
* <a href="http://java.sun.com/javase/6/docs/technotes/guides/logging/index.html">java.util.logging</a>
|
||||||
@ -25,8 +27,8 @@ public class JdkLoggerFactory extends InternalLoggerFactory {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InternalLogger newInstance(String name) {
|
public InternalLogger newInstance(String name) {
|
||||||
final java.util.logging.Logger logger =
|
final Logger logger =
|
||||||
java.util.logging.Logger.getLogger(name);
|
Logger.getLogger(name);
|
||||||
return new JdkLogger(logger, name);
|
return new JdkLogger(logger, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
package org.jboss.netty.logging;
|
package org.jboss.netty.logging;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logger factory which creates an
|
* Logger factory which creates an
|
||||||
* <a href="http://logging.apache.org/log4j/1.2/index.html">Apache Log4J</a>
|
* <a href="http://logging.apache.org/log4j/1.2/index.html">Apache Log4J</a>
|
||||||
@ -24,8 +26,8 @@ public class Log4JLoggerFactory extends InternalLoggerFactory {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InternalLogger newInstance(String name) {
|
public InternalLogger newInstance(String name) {
|
||||||
final org.apache.log4j.Logger logger =
|
final Logger logger =
|
||||||
org.apache.log4j.Logger.getLogger(name);
|
Logger.getLogger(name);
|
||||||
return new Log4JLogger(logger);
|
return new Log4JLogger(logger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
package org.jboss.netty.logging;
|
package org.jboss.netty.logging;
|
||||||
|
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logger factory which creates a <a href="http://www.slf4j.org/">SLF4J</a>
|
* Logger factory which creates a <a href="http://www.slf4j.org/">SLF4J</a>
|
||||||
@ -25,8 +27,8 @@ public class Slf4JLoggerFactory extends InternalLoggerFactory {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InternalLogger newInstance(String name) {
|
public InternalLogger newInstance(String name) {
|
||||||
final org.slf4j.Logger logger =
|
final Logger logger =
|
||||||
org.slf4j.LoggerFactory.getLogger(name);
|
LoggerFactory.getLogger(name);
|
||||||
return new Slf4JLogger(logger);
|
return new Slf4JLogger(logger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -416,7 +416,7 @@ public class HashedWheelTimer implements Timer {
|
|||||||
// it to a temporary list - we will reschedule it in a
|
// it to a temporary list - we will reschedule it in a
|
||||||
// separate loop.
|
// separate loop.
|
||||||
if (slipped == null) {
|
if (slipped == null) {
|
||||||
slipped = new ArrayList<HashedWheelTimer.HashedWheelTimeout>();
|
slipped = new ArrayList<HashedWheelTimeout>();
|
||||||
}
|
}
|
||||||
slipped.add(timeout);
|
slipped.add(timeout);
|
||||||
}
|
}
|
||||||
|
@ -31,13 +31,14 @@ import java.util.Iterator;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.ConcurrentMap;
|
import java.util.concurrent.ConcurrentMap;
|
||||||
import java.util.concurrent.locks.ReentrantLock;
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An alternative identity-comparing {@link ConcurrentMap} which is similar to
|
* An alternative identity-comparing {@link ConcurrentMap} which is similar to
|
||||||
* {@link java.util.concurrent.ConcurrentHashMap}.
|
* {@link ConcurrentHashMap}.
|
||||||
* @param <K> the type of keys maintained by this map
|
* @param <K> the type of keys maintained by this map
|
||||||
* @param <V> the type of mapped values
|
* @param <V> the type of mapped values
|
||||||
*/
|
*/
|
||||||
|
@ -34,13 +34,14 @@ import java.util.Iterator;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.ConcurrentMap;
|
import java.util.concurrent.ConcurrentMap;
|
||||||
import java.util.concurrent.locks.ReentrantLock;
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An alternative weak-key identity-comparing {@link ConcurrentMap} which is
|
* An alternative weak-key identity-comparing {@link ConcurrentMap} which is
|
||||||
* similar to {@link java.util.concurrent.ConcurrentHashMap}.
|
* similar to {@link ConcurrentHashMap}.
|
||||||
* @param <K> the type of keys maintained by this map
|
* @param <K> the type of keys maintained by this map
|
||||||
* @param <V> the type of mapped values
|
* @param <V> the type of mapped values
|
||||||
*/
|
*/
|
||||||
|
@ -34,13 +34,14 @@ import java.util.Iterator;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.ConcurrentMap;
|
import java.util.concurrent.ConcurrentMap;
|
||||||
import java.util.concurrent.locks.ReentrantLock;
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An alternative weak-key {@link ConcurrentMap} which is similar to
|
* An alternative weak-key {@link ConcurrentMap} which is similar to
|
||||||
* {@link java.util.concurrent.ConcurrentHashMap}.
|
* {@link ConcurrentHashMap}.
|
||||||
* @param <K> the type of keys maintained by this map
|
* @param <K> the type of keys maintained by this map
|
||||||
* @param <V> the type of mapped values
|
* @param <V> the type of mapped values
|
||||||
*/
|
*/
|
||||||
|
@ -22,12 +22,13 @@
|
|||||||
|
|
||||||
package org.jboss.netty.util.internal;
|
package org.jboss.netty.util.internal;
|
||||||
|
|
||||||
|
import java.lang.Math;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A random number generator isolated to the current thread. Like the
|
* A random number generator isolated to the current thread. Like the
|
||||||
* global {@link java.util.Random} generator used by the {@link
|
* global {@link Random} generator used by the {@link
|
||||||
* java.lang.Math} class, a {@code ThreadLocalRandom} is initialized
|
* Math} class, a {@code ThreadLocalRandom} is initialized
|
||||||
* with an internally generated seed that may not otherwise be
|
* with an internally generated seed that may not otherwise be
|
||||||
* modified. When applicable, use of {@code ThreadLocalRandom} rather
|
* modified. When applicable, use of {@code ThreadLocalRandom} rather
|
||||||
* than shared {@code Random} objects in concurrent programs will
|
* than shared {@code Random} objects in concurrent programs will
|
||||||
|
@ -18,6 +18,7 @@ package org.jboss.netty.logging;
|
|||||||
import static org.easymock.EasyMock.*;
|
import static org.easymock.EasyMock.*;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class CommonsLoggerTest {
|
public class CommonsLoggerTest {
|
||||||
@ -25,8 +26,8 @@ public class CommonsLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsDebugEnabled() {
|
public void testIsDebugEnabled() {
|
||||||
org.apache.commons.logging.Log mock =
|
Log mock =
|
||||||
createStrictMock(org.apache.commons.logging.Log.class);
|
createStrictMock(Log.class);
|
||||||
|
|
||||||
expect(mock.isDebugEnabled()).andReturn(true);
|
expect(mock.isDebugEnabled()).andReturn(true);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -38,8 +39,8 @@ public class CommonsLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsInfoEnabled() {
|
public void testIsInfoEnabled() {
|
||||||
org.apache.commons.logging.Log mock =
|
Log mock =
|
||||||
createStrictMock(org.apache.commons.logging.Log.class);
|
createStrictMock(Log.class);
|
||||||
|
|
||||||
expect(mock.isInfoEnabled()).andReturn(true);
|
expect(mock.isInfoEnabled()).andReturn(true);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -51,8 +52,8 @@ public class CommonsLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsWarnEnabled() {
|
public void testIsWarnEnabled() {
|
||||||
org.apache.commons.logging.Log mock =
|
Log mock =
|
||||||
createStrictMock(org.apache.commons.logging.Log.class);
|
createStrictMock(Log.class);
|
||||||
|
|
||||||
expect(mock.isWarnEnabled()).andReturn(true);
|
expect(mock.isWarnEnabled()).andReturn(true);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -64,8 +65,8 @@ public class CommonsLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsErrorEnabled() {
|
public void testIsErrorEnabled() {
|
||||||
org.apache.commons.logging.Log mock =
|
Log mock =
|
||||||
createStrictMock(org.apache.commons.logging.Log.class);
|
createStrictMock(Log.class);
|
||||||
|
|
||||||
expect(mock.isErrorEnabled()).andReturn(true);
|
expect(mock.isErrorEnabled()).andReturn(true);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -77,8 +78,8 @@ public class CommonsLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDebug() {
|
public void testDebug() {
|
||||||
org.apache.commons.logging.Log mock =
|
Log mock =
|
||||||
createStrictMock(org.apache.commons.logging.Log.class);
|
createStrictMock(Log.class);
|
||||||
|
|
||||||
mock.debug("a");
|
mock.debug("a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -90,8 +91,8 @@ public class CommonsLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDebugWithException() {
|
public void testDebugWithException() {
|
||||||
org.apache.commons.logging.Log mock =
|
Log mock =
|
||||||
createStrictMock(org.apache.commons.logging.Log.class);
|
createStrictMock(Log.class);
|
||||||
|
|
||||||
mock.debug("a", e);
|
mock.debug("a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -103,8 +104,8 @@ public class CommonsLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInfo() {
|
public void testInfo() {
|
||||||
org.apache.commons.logging.Log mock =
|
Log mock =
|
||||||
createStrictMock(org.apache.commons.logging.Log.class);
|
createStrictMock(Log.class);
|
||||||
|
|
||||||
mock.info("a");
|
mock.info("a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -116,8 +117,8 @@ public class CommonsLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInfoWithException() {
|
public void testInfoWithException() {
|
||||||
org.apache.commons.logging.Log mock =
|
Log mock =
|
||||||
createStrictMock(org.apache.commons.logging.Log.class);
|
createStrictMock(Log.class);
|
||||||
|
|
||||||
mock.info("a", e);
|
mock.info("a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -129,8 +130,8 @@ public class CommonsLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWarn() {
|
public void testWarn() {
|
||||||
org.apache.commons.logging.Log mock =
|
Log mock =
|
||||||
createStrictMock(org.apache.commons.logging.Log.class);
|
createStrictMock(Log.class);
|
||||||
|
|
||||||
mock.warn("a");
|
mock.warn("a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -142,8 +143,8 @@ public class CommonsLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWarnWithException() {
|
public void testWarnWithException() {
|
||||||
org.apache.commons.logging.Log mock =
|
Log mock =
|
||||||
createStrictMock(org.apache.commons.logging.Log.class);
|
createStrictMock(Log.class);
|
||||||
|
|
||||||
mock.warn("a", e);
|
mock.warn("a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -155,8 +156,8 @@ public class CommonsLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testError() {
|
public void testError() {
|
||||||
org.apache.commons.logging.Log mock =
|
Log mock =
|
||||||
createStrictMock(org.apache.commons.logging.Log.class);
|
createStrictMock(Log.class);
|
||||||
|
|
||||||
mock.error("a");
|
mock.error("a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -168,8 +169,8 @@ public class CommonsLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testErrorWithException() {
|
public void testErrorWithException() {
|
||||||
org.apache.commons.logging.Log mock =
|
Log mock =
|
||||||
createStrictMock(org.apache.commons.logging.Log.class);
|
createStrictMock(Log.class);
|
||||||
|
|
||||||
mock.error("a", e);
|
mock.error("a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
|
@ -18,6 +18,7 @@ package org.jboss.netty.logging;
|
|||||||
import static org.easymock.EasyMock.*;
|
import static org.easymock.EasyMock.*;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
import org.jboss.logging.Logger;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class JBossLoggerTest {
|
public class JBossLoggerTest {
|
||||||
@ -26,8 +27,8 @@ public class JBossLoggerTest {
|
|||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public void testIsDebugEnabled() {
|
public void testIsDebugEnabled() {
|
||||||
org.jboss.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.jboss.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
expect(mock.isDebugEnabled()).andReturn(true);
|
expect(mock.isDebugEnabled()).andReturn(true);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -40,8 +41,8 @@ public class JBossLoggerTest {
|
|||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public void testIsInfoEnabled() {
|
public void testIsInfoEnabled() {
|
||||||
org.jboss.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.jboss.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
expect(mock.isInfoEnabled()).andReturn(true);
|
expect(mock.isInfoEnabled()).andReturn(true);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -53,8 +54,8 @@ public class JBossLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsWarnEnabled() {
|
public void testIsWarnEnabled() {
|
||||||
org.jboss.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.jboss.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
|
|
||||||
InternalLogger logger = new JBossLogger(mock);
|
InternalLogger logger = new JBossLogger(mock);
|
||||||
@ -64,8 +65,8 @@ public class JBossLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsErrorEnabled() {
|
public void testIsErrorEnabled() {
|
||||||
org.jboss.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.jboss.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
|
|
||||||
InternalLogger logger = new JBossLogger(mock);
|
InternalLogger logger = new JBossLogger(mock);
|
||||||
@ -75,8 +76,8 @@ public class JBossLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDebug() {
|
public void testDebug() {
|
||||||
org.jboss.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.jboss.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.debug("a");
|
mock.debug("a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -88,8 +89,8 @@ public class JBossLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDebugWithException() {
|
public void testDebugWithException() {
|
||||||
org.jboss.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.jboss.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.debug("a", e);
|
mock.debug("a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -101,8 +102,8 @@ public class JBossLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInfo() {
|
public void testInfo() {
|
||||||
org.jboss.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.jboss.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.info("a");
|
mock.info("a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -114,8 +115,8 @@ public class JBossLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInfoWithException() {
|
public void testInfoWithException() {
|
||||||
org.jboss.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.jboss.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.info("a", e);
|
mock.info("a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -127,8 +128,8 @@ public class JBossLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWarn() {
|
public void testWarn() {
|
||||||
org.jboss.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.jboss.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.warn("a");
|
mock.warn("a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -140,8 +141,8 @@ public class JBossLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWarnWithException() {
|
public void testWarnWithException() {
|
||||||
org.jboss.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.jboss.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.warn("a", e);
|
mock.warn("a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -153,8 +154,8 @@ public class JBossLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testError() {
|
public void testError() {
|
||||||
org.jboss.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.jboss.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.error("a");
|
mock.error("a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -166,8 +167,8 @@ public class JBossLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testErrorWithException() {
|
public void testErrorWithException() {
|
||||||
org.jboss.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.jboss.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.error("a", e);
|
mock.error("a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
|
@ -19,6 +19,7 @@ import static org.easymock.EasyMock.*;
|
|||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
@ -28,8 +29,8 @@ public class JdkLoggerTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testIsDebugEnabled() {
|
public void testIsDebugEnabled() {
|
||||||
|
|
||||||
java.util.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(java.util.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
expect(mock.isLoggable(Level.FINE)).andReturn(true);
|
expect(mock.isLoggable(Level.FINE)).andReturn(true);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -41,8 +42,8 @@ public class JdkLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsInfoEnabled() {
|
public void testIsInfoEnabled() {
|
||||||
java.util.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(java.util.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
expect(mock.isLoggable(Level.INFO)).andReturn(true);
|
expect(mock.isLoggable(Level.INFO)).andReturn(true);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -54,8 +55,8 @@ public class JdkLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsWarnEnabled() {
|
public void testIsWarnEnabled() {
|
||||||
java.util.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(java.util.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
expect(mock.isLoggable(Level.WARNING)).andReturn(true);
|
expect(mock.isLoggable(Level.WARNING)).andReturn(true);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -67,8 +68,8 @@ public class JdkLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsErrorEnabled() {
|
public void testIsErrorEnabled() {
|
||||||
java.util.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(java.util.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
expect(mock.isLoggable(Level.SEVERE)).andReturn(true);
|
expect(mock.isLoggable(Level.SEVERE)).andReturn(true);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -80,8 +81,8 @@ public class JdkLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDebug() {
|
public void testDebug() {
|
||||||
java.util.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(java.util.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.logp(Level.FINE, "foo", null, "a");
|
mock.logp(Level.FINE, "foo", null, "a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -93,8 +94,8 @@ public class JdkLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDebugWithException() {
|
public void testDebugWithException() {
|
||||||
java.util.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(java.util.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.logp(Level.FINE, "foo", null, "a", e);
|
mock.logp(Level.FINE, "foo", null, "a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -106,8 +107,8 @@ public class JdkLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInfo() {
|
public void testInfo() {
|
||||||
java.util.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(java.util.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.logp(Level.INFO, "foo", null, "a");
|
mock.logp(Level.INFO, "foo", null, "a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -119,8 +120,8 @@ public class JdkLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInfoWithException() {
|
public void testInfoWithException() {
|
||||||
java.util.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(java.util.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.logp(Level.INFO, "foo", null, "a", e);
|
mock.logp(Level.INFO, "foo", null, "a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -132,8 +133,8 @@ public class JdkLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWarn() {
|
public void testWarn() {
|
||||||
java.util.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(java.util.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.logp(Level.WARNING, "foo", null, "a");
|
mock.logp(Level.WARNING, "foo", null, "a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -145,8 +146,8 @@ public class JdkLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWarnWithException() {
|
public void testWarnWithException() {
|
||||||
java.util.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(java.util.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.logp(Level.WARNING, "foo", null, "a", e);
|
mock.logp(Level.WARNING, "foo", null, "a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -158,8 +159,8 @@ public class JdkLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testError() {
|
public void testError() {
|
||||||
java.util.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(java.util.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.logp(Level.SEVERE, "foo", null, "a");
|
mock.logp(Level.SEVERE, "foo", null, "a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -171,8 +172,8 @@ public class JdkLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testErrorWithException() {
|
public void testErrorWithException() {
|
||||||
java.util.logging.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(java.util.logging.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.logp(Level.SEVERE, "foo", null, "a", e);
|
mock.logp(Level.SEVERE, "foo", null, "a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
|
@ -18,6 +18,7 @@ package org.jboss.netty.logging;
|
|||||||
import static org.easymock.EasyMock.*;
|
import static org.easymock.EasyMock.*;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class Log4JLoggerTest {
|
public class Log4JLoggerTest {
|
||||||
@ -26,8 +27,8 @@ public class Log4JLoggerTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testIsDebugEnabled() {
|
public void testIsDebugEnabled() {
|
||||||
|
|
||||||
org.apache.log4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.apache.log4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
expect(mock.isDebugEnabled()).andReturn(true);
|
expect(mock.isDebugEnabled()).andReturn(true);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -39,8 +40,8 @@ public class Log4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsInfoEnabled() {
|
public void testIsInfoEnabled() {
|
||||||
org.apache.log4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.apache.log4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
expect(mock.isInfoEnabled()).andReturn(true);
|
expect(mock.isInfoEnabled()).andReturn(true);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -52,8 +53,8 @@ public class Log4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsWarnEnabled() {
|
public void testIsWarnEnabled() {
|
||||||
org.apache.log4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.apache.log4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
replay(mock);
|
replay(mock);
|
||||||
|
|
||||||
@ -64,8 +65,8 @@ public class Log4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsErrorEnabled() {
|
public void testIsErrorEnabled() {
|
||||||
org.apache.log4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.apache.log4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
|
|
||||||
InternalLogger logger = new Log4JLogger(mock);
|
InternalLogger logger = new Log4JLogger(mock);
|
||||||
@ -75,8 +76,8 @@ public class Log4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDebug() {
|
public void testDebug() {
|
||||||
org.apache.log4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.apache.log4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.debug("a");
|
mock.debug("a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -88,8 +89,8 @@ public class Log4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDebugWithException() {
|
public void testDebugWithException() {
|
||||||
org.apache.log4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.apache.log4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.debug("a", e);
|
mock.debug("a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -101,8 +102,8 @@ public class Log4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInfo() {
|
public void testInfo() {
|
||||||
org.apache.log4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.apache.log4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.info("a");
|
mock.info("a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -114,8 +115,8 @@ public class Log4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInfoWithException() {
|
public void testInfoWithException() {
|
||||||
org.apache.log4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.apache.log4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.info("a", e);
|
mock.info("a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -127,8 +128,8 @@ public class Log4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWarn() {
|
public void testWarn() {
|
||||||
org.apache.log4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.apache.log4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.warn("a");
|
mock.warn("a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -140,8 +141,8 @@ public class Log4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWarnWithException() {
|
public void testWarnWithException() {
|
||||||
org.apache.log4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.apache.log4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.warn("a", e);
|
mock.warn("a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -153,8 +154,8 @@ public class Log4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testError() {
|
public void testError() {
|
||||||
org.apache.log4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.apache.log4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.error("a");
|
mock.error("a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -166,8 +167,8 @@ public class Log4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testErrorWithException() {
|
public void testErrorWithException() {
|
||||||
org.apache.log4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.apache.log4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.error("a", e);
|
mock.error("a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
|
@ -19,14 +19,15 @@ import static org.easymock.EasyMock.*;
|
|||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
public class Slf4JLoggerTest {
|
public class Slf4JLoggerTest {
|
||||||
private static final Exception e = new Exception();
|
private static final Exception e = new Exception();
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsDebugEnabled() {
|
public void testIsDebugEnabled() {
|
||||||
org.slf4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.slf4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
expect(mock.isDebugEnabled()).andReturn(true);
|
expect(mock.isDebugEnabled()).andReturn(true);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -38,8 +39,8 @@ public class Slf4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsInfoEnabled() {
|
public void testIsInfoEnabled() {
|
||||||
org.slf4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.slf4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
expect(mock.isInfoEnabled()).andReturn(true);
|
expect(mock.isInfoEnabled()).andReturn(true);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -51,8 +52,8 @@ public class Slf4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsWarnEnabled() {
|
public void testIsWarnEnabled() {
|
||||||
org.slf4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.slf4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
expect(mock.isWarnEnabled()).andReturn(true);
|
expect(mock.isWarnEnabled()).andReturn(true);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -64,8 +65,8 @@ public class Slf4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testIsErrorEnabled() {
|
public void testIsErrorEnabled() {
|
||||||
org.slf4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.slf4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
expect(mock.isErrorEnabled()).andReturn(true);
|
expect(mock.isErrorEnabled()).andReturn(true);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -77,8 +78,8 @@ public class Slf4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDebug() {
|
public void testDebug() {
|
||||||
org.slf4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.slf4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.debug("a");
|
mock.debug("a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -90,8 +91,8 @@ public class Slf4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDebugWithException() {
|
public void testDebugWithException() {
|
||||||
org.slf4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.slf4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.debug("a", e);
|
mock.debug("a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -103,8 +104,8 @@ public class Slf4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInfo() {
|
public void testInfo() {
|
||||||
org.slf4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.slf4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.info("a");
|
mock.info("a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -116,8 +117,8 @@ public class Slf4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInfoWithException() {
|
public void testInfoWithException() {
|
||||||
org.slf4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.slf4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.info("a", e);
|
mock.info("a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -129,8 +130,8 @@ public class Slf4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWarn() {
|
public void testWarn() {
|
||||||
org.slf4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.slf4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.warn("a");
|
mock.warn("a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -142,8 +143,8 @@ public class Slf4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWarnWithException() {
|
public void testWarnWithException() {
|
||||||
org.slf4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.slf4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.warn("a", e);
|
mock.warn("a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -155,8 +156,8 @@ public class Slf4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testError() {
|
public void testError() {
|
||||||
org.slf4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.slf4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.error("a");
|
mock.error("a");
|
||||||
replay(mock);
|
replay(mock);
|
||||||
@ -168,8 +169,8 @@ public class Slf4JLoggerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testErrorWithException() {
|
public void testErrorWithException() {
|
||||||
org.slf4j.Logger mock =
|
Logger mock =
|
||||||
createStrictMock(org.slf4j.Logger.class);
|
createStrictMock(Logger.class);
|
||||||
|
|
||||||
mock.error("a", e);
|
mock.error("a", e);
|
||||||
replay(mock);
|
replay(mock);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user