use of org.robobinding.codegen.apt.type.WrappedPrimitiveType in project RoboBinding by RoboBinding.
the class SimpleOneWayPropertyInfoTest method givenPrimitivePropertyType_thenReturnBoxedType.
@Test
public void givenPrimitivePropertyType_thenReturnBoxedType() {
final SetterElement setter = context.mock(SetterElement.class);
final WrappedPrimitiveType primitiveType = context.mock(WrappedPrimitiveType.class);
context.checking(new Expectations() {
{
oneOf(setter).parameterType();
will(returnValue(primitiveType));
oneOf(primitiveType).isPrimitive();
will(returnValue(true));
oneOf(primitiveType).boxedClassName();
will(returnValue(Integer.class.getName()));
}
});
SimpleOneWayPropertyInfo info = new SimpleOneWayPropertyInfo(setter);
assertThat(info.propertyType(), equalTo(Integer.class.getName()));
}
Aggregations