use of org.robobinding.codegen.apt.type.WrappedDeclaredType in project RoboBinding by RoboBinding.
the class WrappedTypeElement method typeElementOf.
private WrappedTypeElement typeElementOf(DeclaredType declaredType) {
WrappedDeclaredType type = typeWrapper.wrap(declaredType);
TypeElement element = (TypeElement) types.asElement(declaredType);
return new WrappedTypeElement(element, type, typeWrapper, loggerFactory, elements, wrapper, types);
}
use of org.robobinding.codegen.apt.type.WrappedDeclaredType in project RoboBinding by RoboBinding.
the class SimpleOneWayPropertyInfoTest method givenObjectPropertyType_thenReturnSameType.
@Test
public void givenObjectPropertyType_thenReturnSameType() {
final SetterElement setter = context.mock(SetterElement.class);
final WrappedDeclaredType declaredType = context.mock(WrappedDeclaredType.class);
context.checking(new Expectations() {
{
oneOf(setter).parameterType();
will(returnValue(declaredType));
oneOf(declaredType).isPrimitive();
will(returnValue(false));
oneOf(declaredType).className();
will(returnValue(Object.class.getName()));
}
});
SimpleOneWayPropertyInfo info = new SimpleOneWayPropertyInfo(setter);
assertThat(info.propertyType(), equalTo(Object.class.getName()));
}
Aggregations