]
Nicolas Challut updated ROASTER-105:
------------------------------------
Affects Version/s: 2.14.0.Final
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
{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}