@Test public void getDerivedWithSeparatorReturnsADerivedPropertyDescriptor() { PropertyParser parser = mock(PropertyParser.class); PropertyDescriptor descriptor = instance.getDerivedWithSeparator( "relationName", "propertyName", parser, "accepted", "--" ); assertThat(descriptor, is(instanceOf(RelatedPropertyDescriptor.class))); }
public PropertyDescriptor getDerivedWithSeparator(String relationName, String propertyName, PropertyParser parser, String acceptedPropertyName, String separator) { return new RelatedPropertyDescriptor(relationName, propertyName, parser, acceptedPropertyName, separator); }
PropertyDescriptorFactory { public PropertyDescriptor getDerivedWithSeparator(String relationName, String propertyName, PropertyParser parser, String acceptedPropertyName, String separator) { return new RelatedPropertyDescriptor(relationName, propertyName, parser, acceptedPropertyName, separator); } }
PropertyDescriptorFactory { public PropertyDescriptor getDerivedWithSeparator(String relationName, String propertyName, PropertyParser parser, String acceptedPropertyName, String separator) { return new RelatedPropertyDescriptor(relationName, propertyName, parser, acceptedPropertyName, separator); } PropertyDescriptorFactory(PropertyParserFactory parserFactory); }
PropertyDescriptorFactory { public PropertyDescriptor getDerivedWithSeparator(String relationName, String propertyName, PropertyParser parser, String acceptedPropertyName, String separator) { return new RelatedPropertyDescriptor(relationName, propertyName, parser, acceptedPropertyName, separator); } PropertyDescriptorFactory(PropertyParserFactory parserFactory); PropertyDescriptor getLocal(String propertyName, PropertyParser parser); PropertyDescriptor getLocal(String propertyName, Class<?> typeToParse); PropertyDescriptor getLocal(String propertyName, PropertyParser parser, String prefix, String postfix); PropertyDescriptor getLocal(String propertyName, Class<?> typeToConvert, String prefix, String postfix); PropertyDescriptor getLocal(String propertyName, String separator); PropertyDescriptor getComposite(PropertyDescriptor preferred, PropertyDescriptor backUp); PropertyDescriptor getDerived(String relationName, String propertyName, String acceptedPropertyName,
                                       Class<?> typeToParse); PropertyDescriptor getDerivedWithSeparator(String relationName, String propertyName, PropertyParser parser,
                                                    String acceptedPropertyName, String separator); PropertyDescriptor getAppender(PropertyDescriptor first, PropertyDescriptor second, String separator); }
PropertyDescriptorFactory { public PropertyDescriptor getDerivedWithSeparator(String relationName, String propertyName, PropertyParser parser, String acceptedPropertyName, String separator) { return new RelatedPropertyDescriptor(relationName, propertyName, parser, acceptedPropertyName, separator); } PropertyDescriptorFactory(PropertyParserFactory parserFactory); PropertyDescriptor getLocal(String propertyName, PropertyParser parser); PropertyDescriptor getLocal(String propertyName, Class<?> typeToParse); PropertyDescriptor getLocal(String propertyName, PropertyParser parser, String prefix, String postfix); PropertyDescriptor getLocal(String propertyName, Class<?> typeToConvert, String prefix, String postfix); PropertyDescriptor getLocal(String propertyName, String separator); PropertyDescriptor getComposite(PropertyDescriptor preferred, PropertyDescriptor backUp); PropertyDescriptor getDerived(String relationName, String propertyName, String acceptedPropertyName,
                                       Class<?> typeToParse); PropertyDescriptor getDerivedWithSeparator(String relationName, String propertyName, PropertyParser parser,
                                                    String acceptedPropertyName, String separator); PropertyDescriptor getAppender(PropertyDescriptor first, PropertyDescriptor second, String separator);  }