public void testEqualsArrayValue() throws Exception { ComponentDescriptor<? extends ImmutableBeanConfigurationTest> componentDescriptor = Descriptors.ofComponent(getClass()); ConfiguredPropertyDescriptor propertyDescriptor = componentDescriptor.getConfiguredProperty("Conf"); assertNotNull(propertyDescriptor); Map<ConfiguredPropertyDescriptor, Object> properties1 = new HashMap<ConfiguredPropertyDescriptor, Object>(); properties1.put(propertyDescriptor, new String[] {"hello", "world"}); Map<ConfiguredPropertyDescriptor, Object> properties2 = new HashMap<ConfiguredPropertyDescriptor, Object>(); properties2.put(propertyDescriptor, new String[] {"hello", "world"}); ImmutableComponentConfiguration conf1 = new ImmutableComponentConfiguration(properties1); ImmutableComponentConfiguration conf2 = new ImmutableComponentConfiguration(properties2); assertEquals(conf1.hashCode(), conf2.hashCode()); assertEquals(conf1, conf2); }
public void testDescriptor() throws Exception { AnalyzerDescriptor<DateGapAnalyzer> descriptor = Descriptors.ofAnalyzer(DateGapAnalyzer.class); assertEquals("Date gap analyzer", descriptor.getDisplayName()); }