@Ignore @Test public void testConstructorWithOneDevice() { NativeAccessTest nativeAccess = new NativeAccessTest(); NativeDescriptor descriptor = new NativeDescriptor(); descriptor.identifier = "id1"; descriptor.port = "port1"; descriptor.type = HardwareType.SERIAL; nativeAccess.addHandle(descriptor); HardwareManagerImpl manager = new HardwareManagerImpl(nativeAccess); Collection<String> ids = manager.getHardwareIdentifiers(); assertTrue(1 == ids.size()); for (String id : ids) { assertEquals(id, "id1"); } }
@Override public Collection<String> getHardwareIdentifiers() { synchronized (devices) { return new ArrayList<String>(devices.keySet()); } }
HardwareManagerImpl implements HardwareManager, Runnable { @Override public Collection<String> getHardwareIdentifiers() { synchronized (devices) { return new ArrayList<String>(devices.keySet()); } } }
HardwareManagerImpl implements HardwareManager, Runnable { @Override public Collection<String> getHardwareIdentifiers() { synchronized (devices) { return new ArrayList<String>(devices.keySet()); } } HardwareManagerImpl();   HardwareManagerImpl(NativeAccess nativeAccess); }
HardwareManagerImpl implements HardwareManager, Runnable { @Override public Collection<String> getHardwareIdentifiers() { synchronized (devices) { return new ArrayList<String>(devices.keySet()); } } HardwareManagerImpl();   HardwareManagerImpl(NativeAccess nativeAccess); @Activate void activate(); @Deactivate void exit(); @Override Collection<String> getHardwareIdentifiers(); @Override Collection<HardwareDescriptor> getHardwareDescriptors(); @Override Collection<HardwareDescriptor> getHardwareDescriptors(String pattern); @Override HardwareDescriptor getDescriptor(String identifier); @Override void addListener(HardwareListener listener); @Override void removeListener(HardwareListener listener); @Override void run(); @Override String getPortName(final String portNameProp, String descriptorRegEx, HardwareListener hwListener); }
HardwareManagerImpl implements HardwareManager, Runnable { @Override public Collection<String> getHardwareIdentifiers() { synchronized (devices) { return new ArrayList<String>(devices.keySet()); } } HardwareManagerImpl();   HardwareManagerImpl(NativeAccess nativeAccess); @Activate void activate(); @Deactivate void exit(); @Override Collection<String> getHardwareIdentifiers(); @Override Collection<HardwareDescriptor> getHardwareDescriptors(); @Override Collection<HardwareDescriptor> getHardwareDescriptors(String pattern); @Override HardwareDescriptor getDescriptor(String identifier); @Override void addListener(HardwareListener listener); @Override void removeListener(HardwareListener listener); @Override void run(); @Override String getPortName(final String portNameProp, String descriptorRegEx, HardwareListener hwListener);  }