[JBoss JIRA] (ROASTER-105) addProperty with generic value doesn't transform import
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-105?page=com.atlassian.jira.plugi... ]
George Gastaldi closed ROASTER-105.
-----------------------------------
Fix Version/s: 2.19.0.Final
Assignee: George Gastaldi
Resolution: Done
> addProperty with generic value doesn't transform import
> -------------------------------------------------------
>
> Key: ROASTER-105
> URL: https://issues.jboss.org/browse/ROASTER-105
> Project: Roaster
> Issue Type: Bug
> Affects Versions: 2.14.0.Final
> Reporter: Nicolas Challut
> Assignee: George Gastaldi
> Fix For: 2.19.0.Final
>
>
> {code:java}
> @Test
> public void addGenericAndGetPropertyType()
> {
> JavaClassSource classSource = Roaster.create(JavaClassSource.class);
> classSource.addProperty("java.util.List<java.lang.String>", "list");
> PropertySource<JavaClassSource> property = classSource.getProperty("list");
> Type<JavaClassSource> propertyType = property.getType();
> assertEquals("List<String>", propertyType.toString());
> }
> @Test
> public void addGenericAndGetFieldType()
> {
> JavaClassSource classSource = Roaster.create(JavaClassSource.class);
> classSource.addProperty("java.util.List<java.lang.String>", "list");
> PropertySource<JavaClassSource> property = classSource.getProperty("list");
> FieldSource<JavaClassSource> field = property.getField();
> Type<JavaClassSource> fieldType = field.getType();
> assertEquals("List<String>", fieldType.toString());
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)