|
|
@ -126,12 +126,14 @@ public class DelimitedStringToCollectionConverterTests {
|
|
|
|
assertThat(converted).containsExactly("a,b,c");
|
|
|
|
assertThat(converted).containsExactly("a,b,c");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void convertWhenHasCollectionObjectTypeShouldUseCollectionObjectType() {
|
|
|
|
public void convertWhenHasCollectionObjectTypeShouldUseCollectionObjectType() {
|
|
|
|
TypeDescriptor sourceType = TypeDescriptor.valueOf(String.class);
|
|
|
|
TypeDescriptor sourceType = TypeDescriptor.valueOf(String.class);
|
|
|
|
TypeDescriptor targetType = TypeDescriptor
|
|
|
|
TypeDescriptor targetType = TypeDescriptor
|
|
|
|
.nested(ReflectionUtils.findField(Values.class, "specificType"), 0);
|
|
|
|
.nested(ReflectionUtils.findField(Values.class, "specificType"), 0);
|
|
|
|
MyCustomList<String> converted = (MyCustomList<String>) this.conversionService.convert("a*b", sourceType, targetType);
|
|
|
|
MyCustomList<String> converted = (MyCustomList<String>) this.conversionService
|
|
|
|
|
|
|
|
.convert("a*b", sourceType, targetType);
|
|
|
|
assertThat(converted).containsExactly("a", "b");
|
|
|
|
assertThat(converted).containsExactly("a", "b");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|