@Test public void testRemoveChannelListen() throws Exception { DeviceLocator deviceLocator = createDeviceLocator(driver.getDriverId(), "", "", null); ChannelLocator channelLocator = createChannelLocator("1", deviceLocator); driver.channels.put(channelLocator, new AtomicInteger()); ChannelConfiguration configuration = channelManager.addChannel(channelLocator, Direction.DIRECTION_INPUT, ChannelConfiguration.LISTEN_FOR_UPDATE); assertEquals(1, driver.channelAddedCount); assertEquals(1, driver.addedChannels.size()); assertEquals(channelLocator, driver.addedChannels.get(0)); assertEquals(1, driver.listenChannels.size()); assertEquals(channelLocator, driver.listenChannels.get(0).getChannelLocator()); channelManager.deleteChannel(configuration); assertEquals(1, driver.channelRemovedCount); assertEquals(0, driver.addedChannels.size()); assertEquals(0, driver.listenChannels.size()); }
ChannelLocator getChannelLocator() { return channelLocator; }
Channel { ChannelLocator getChannelLocator() { return channelLocator; } }
Channel { ChannelLocator getChannelLocator() { return channelLocator; } Channel(Driver driver, ChannelLocator channelLocator); }
Channel { ChannelLocator getChannelLocator() { return channelLocator; } Channel(Driver driver, ChannelLocator channelLocator);  }
Channel { ChannelLocator getChannelLocator() { return channelLocator; } Channel(Driver driver, ChannelLocator channelLocator);   }