[
https://issues.jboss.org/browse/ROASTER-105?page=com.atlassian.jira.plugi...
]
Nicolas Challut updated ROASTER-105:
------------------------------------
Description:
{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}
addProperty with generic value doesn't transform import
-------------------------------------------------------
Key: ROASTER-105
URL:
https://issues.jboss.org/browse/ROASTER-105
Project: Roaster
Issue Type: Bug
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}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)