"2", h.getAttribute(Handler.FILE_NUMBER_ATTRIBUTE));
assertEquals("handler: test.load.myhandler2: bad max size",
"20", h.getAttribute(Handler.MAX_SIZE_ATTRIBUTE));
//------ Logger ------//
TopicalLogger l = null;
l = (TopicalLogger) lf.getLogger("test.load.bar");
assertEquals("logger: test.load.bar: bad level",
BasicLevel.DEBUG, l.getCurrentIntLevel());
l = (TopicalLogger) lf.getLogger("test.load.foo");
assertEquals("logger: test.load.foo: bad level",
BasicLevel.DEBUG + 1, l.getCurrentIntLevel());
l = (TopicalLogger) lf.getLogger("test.load.foo3");
Handler[] hs = l.getHandler();
assertNotNull("logger: test.load.foo3: handler list is null", hs);
assertEquals("logger: test.load.foo3: handler list is empty",
1, hs.length);
assertEquals("logger: test.load.foo3: bad handler",
hf.getHandler("myhandler1"), hs[0]);
l = (TopicalLogger) lf.getLogger("test.load.foo4");
hs = l.getHandler();
assertNotNull("logger: test.load.foo4: handler list is null", hs);
assertEquals("logger: test.load.foo4: handler list is empty",
2, hs.length);
assertNotNull("logger: test.load.foo4: handler element 0 is null", hs[0]);
assertNotNull("logger: test.load.foo4: handler element 1 is null", hs[1]);
if (!hs[0].equals(hf.getHandler("test.load.myhandler2"))
&& !hs[1].equals(hf.getHandler("test.load.myhandler2"))) {
fail("logger: test.load.foo4: 'test.load.myhandler2' handler not found");
}
if (!hs[0].equals(hf.getHandler("test.load.myhandler3"))
&& !hs[1].equals(hf.getHandler("test.load.myhandler3"))) {
fail("logger: test.load.foo4: 'test.load.myhandler3' handler not found");
}
l = (TopicalLogger) lf.getLogger("test.load.foo2");
String[] ts = l.getTopic();
assertNotNull("logger: test.load.foo2: topic list is null", ts);
assertEquals("logger: test.load.foo2: bad topic list size",
3, ts.length);
assertNotNull("logger: test.load.foo2: topic element 0 is null", ts[0]);
assertNotNull("logger: test.load.foo2: topic element 1 is null", ts[1]);