@Test public void testFindPropertyReaders() { FeatureDescriptor result = propertyManager.getFeatureDescriptor("feature-1"); assertNotNull(result); assertEquals("feature-1", result.getName()); }
public FeatureDescriptor getFeatureDescriptor(final String name) { for (final PropertyReader reader : propertyReaders) { final FeatureDescriptor descriptor = reader.getFeatureDescriptor(name); if (descriptor != null) { return descriptor; } } throw new MissingFeatureDescriptorException(String.format( "Couldn't find a feature descriptor for feature named [%s].", name)); }
PropertyManager { public FeatureDescriptor getFeatureDescriptor(final String name) { for (final PropertyReader reader : propertyReaders) { final FeatureDescriptor descriptor = reader.getFeatureDescriptor(name); if (descriptor != null) { return descriptor; } } throw new MissingFeatureDescriptorException(String.format( "Couldn't find a feature descriptor for feature named [%s].", name)); } }
PropertyManager { public FeatureDescriptor getFeatureDescriptor(final String name) { for (final PropertyReader reader : propertyReaders) { final FeatureDescriptor descriptor = reader.getFeatureDescriptor(name); if (descriptor != null) { return descriptor; } } throw new MissingFeatureDescriptorException(String.format( "Couldn't find a feature descriptor for feature named [%s].", name)); } PropertyManager(final Environment environment); }
PropertyManager { public FeatureDescriptor getFeatureDescriptor(final String name) { for (final PropertyReader reader : propertyReaders) { final FeatureDescriptor descriptor = reader.getFeatureDescriptor(name); if (descriptor != null) { return descriptor; } } throw new MissingFeatureDescriptorException(String.format( "Couldn't find a feature descriptor for feature named [%s].", name)); } PropertyManager(final Environment environment); FeatureDescriptor getFeatureDescriptor(final String name); }
PropertyManager { public FeatureDescriptor getFeatureDescriptor(final String name) { for (final PropertyReader reader : propertyReaders) { final FeatureDescriptor descriptor = reader.getFeatureDescriptor(name); if (descriptor != null) { return descriptor; } } throw new MissingFeatureDescriptorException(String.format( "Couldn't find a feature descriptor for feature named [%s].", name)); } PropertyManager(final Environment environment); FeatureDescriptor getFeatureDescriptor(final String name);  }