01: package org.codehaus.spice.netserve.connection.impl;
02:
03: import junit.framework.TestCase;
04:
05: public class PicoAcceptorManagerTestCase extends TestCase {
06: public void testPicoAcceptorManagerWithMonitorAndShutdownSet()
07: throws Exception {
08: final NullAcceptorMonitor monitor = new NullAcceptorMonitor();
09: final PicoAcceptorManager manager = new PicoAcceptorManager(22,
10: monitor);
11: assertEquals("shutdownTimeout", 22, manager
12: .getShutdownTimeout());
13: assertEquals("monitor", monitor, manager.getMonitor());
14: }
15:
16: public void testPicoAcceptorManagerWithShutdownSet()
17: throws Exception {
18: final PicoAcceptorManager manager = new PicoAcceptorManager(22);
19: assertEquals("shutdownTimeout", 22, manager
20: .getShutdownTimeout());
21: assertEquals("monitor", NullAcceptorMonitor.MONITOR, manager
22: .getMonitor());
23: }
24:
25: public void testPicoAcceptorManagerWithMonitorSet()
26: throws Exception {
27: final NullAcceptorMonitor monitor = new NullAcceptorMonitor();
28: final PicoAcceptorManager manager = new PicoAcceptorManager(
29: monitor);
30: assertEquals("shutdownTimeout", 0, manager.getShutdownTimeout());
31: assertEquals("monitor", monitor, manager.getMonitor());
32: }
33:
34: public void testPicoAcceptorManagerWithDefaultCtor()
35: throws Exception {
36: final PicoAcceptorManager manager = new PicoAcceptorManager();
37: assertEquals("shutdownTimeout", 0, manager.getShutdownTimeout());
38: assertEquals("monitor", NullAcceptorMonitor.MONITOR, manager
39: .getMonitor());
40: }
41: }
|