@Test(expected = IllegalArgumentException.class) public void test_isRegisteredDeviceIllegal() throws MalformedURLException, URISyntaxException { Assert.assertTrue(IpCamDeviceRegistry.isRegistered((IpCamDevice) null)); }
public static boolean isRegistered(IpCamDevice ipcam) { if (ipcam == null) { throw new IllegalArgumentException("IP camera device cannot be null"); } Iterator<IpCamDevice> di = DEVICES.iterator(); while (di.hasNext()) { if (di.next().getName().equals(ipcam.getName())) { return true; } } return false; }
IpCamDeviceRegistry { public static boolean isRegistered(IpCamDevice ipcam) { if (ipcam == null) { throw new IllegalArgumentException("IP camera device cannot be null"); } Iterator<IpCamDevice> di = DEVICES.iterator(); while (di.hasNext()) { if (di.next().getName().equals(ipcam.getName())) { return true; } } return false; } }
IpCamDeviceRegistry { public static boolean isRegistered(IpCamDevice ipcam) { if (ipcam == null) { throw new IllegalArgumentException("IP camera device cannot be null"); } Iterator<IpCamDevice> di = DEVICES.iterator(); while (di.hasNext()) { if (di.next().getName().equals(ipcam.getName())) { return true; } } return false; }  }
IpCamDeviceRegistry { public static boolean isRegistered(IpCamDevice ipcam) { if (ipcam == null) { throw new IllegalArgumentException("IP camera device cannot be null"); } Iterator<IpCamDevice> di = DEVICES.iterator(); while (di.hasNext()) { if (di.next().getName().equals(ipcam.getName())) { return true; } } return false; }  static IpCamDevice register(IpCamDevice ipcam); static IpCamDevice register(String name, String url, IpCamMode mode); static IpCamDevice register(String name, URL url, IpCamMode mode); static IpCamDevice register(String name, String url, IpCamMode mode, IpCamAuth auth); static IpCamDevice register(String name, URL url, IpCamMode mode, IpCamAuth auth); static boolean isRegistered(IpCamDevice ipcam); static boolean isRegistered(String name); static boolean isRegistered(URL url); static boolean isRegistered(URI uri); static boolean unregister(IpCamDevice ipcam); static boolean unregister(String name); static List<IpCamDevice> getIpCameras(); static void unregisterAll(); }
IpCamDeviceRegistry { public static boolean isRegistered(IpCamDevice ipcam) { if (ipcam == null) { throw new IllegalArgumentException("IP camera device cannot be null"); } Iterator<IpCamDevice> di = DEVICES.iterator(); while (di.hasNext()) { if (di.next().getName().equals(ipcam.getName())) { return true; } } return false; }  static IpCamDevice register(IpCamDevice ipcam); static IpCamDevice register(String name, String url, IpCamMode mode); static IpCamDevice register(String name, URL url, IpCamMode mode); static IpCamDevice register(String name, String url, IpCamMode mode, IpCamAuth auth); static IpCamDevice register(String name, URL url, IpCamMode mode, IpCamAuth auth); static boolean isRegistered(IpCamDevice ipcam); static boolean isRegistered(String name); static boolean isRegistered(URL url); static boolean isRegistered(URI uri); static boolean unregister(IpCamDevice ipcam); static boolean unregister(String name); static List<IpCamDevice> getIpCameras(); static void unregisterAll();  }