CategoryTestpublic class CategoryTest extends TestCase
Constructors Summary |
---|
public CategoryTest(String name)Constructs new instance of test.
super(name);
|
Methods Summary |
---|
public void | testForcedLog()Tests Category.forcedLog.
MockCategory category = new MockCategory("org.example.foo");
category.setAdditivity(false);
category.addAppender(new VectorAppender());
category.info("Hello, World");
| public void | testGetChainedPriorityReturnType()Tests that the return type of getChainedPriority is Priority.
Method method = Category.class.getMethod("getChainedPriority", (Class[]) null);
assertTrue(method.getReturnType() == Priority.class);
| public void | testL7dlog()Tests l7dlog(Priority, String, Throwable).
Logger logger = Logger.getLogger("org.example.foo");
logger.setLevel(Level.ERROR);
Priority debug = Level.DEBUG;
logger.l7dlog(debug, "Hello, World", null);
| public void | testL7dlog4Param()Tests l7dlog(Priority, String, Object[], Throwable).
Logger logger = Logger.getLogger("org.example.foo");
logger.setLevel(Level.ERROR);
Priority debug = Level.DEBUG;
logger.l7dlog(debug, "Hello, World", new Object[0], null);
| public void | testSetPriority()Tests setPriority(Priority).
Logger logger = Logger.getLogger("org.example.foo");
Priority debug = Level.DEBUG;
logger.setPriority(debug);
|
|