Ejemplo n.º 1
0
 @Test
 public void testRemoveChannelThrowsNotFoundException() throws Throwable {
   ChannelPool channelPool = new ChannelPool();
   try {
     channelPool.removeChannel("testChannelPoolName1");
     fail("Expected NotFoundException to be thrown");
   } catch (NameRegistrar.NotFoundException ex) {
     assertEquals("ex.getMessage()", "channel.testChannelPoolName1", ex.getMessage());
     assertEquals("channelPool.pool.size()", 0, channelPool.pool.size());
   }
 }
Ejemplo n.º 2
0
 @Test
 public void testRemoveChannel() throws Throwable {
   ChannelPool channelPool = new ChannelPool();
   channelPool.removeChannel(new BASE24TCPChannel());
   assertEquals("channelPool.pool.size()", 0, channelPool.pool.size());
 }