use of org.apache.cayenne.exp.property.NumericProperty in project cayenne by apache.
the class PropertyUtilsTest method simpleNumericDefinition.
@Test
public void simpleNumericDefinition() throws Exception {
importUtils.addType(NumericProperty.class.getName());
ObjEntity entity = new ObjEntity("test");
ObjAttribute attribute = new ObjAttribute();
attribute.setName("test");
attribute.setType("int");
entity.addAttribute(attribute);
String definition = propertyUtils.propertyDefinition(attribute);
assertEquals("public static final NumericProperty<Integer> TEST = PropertyFactory.createNumeric(\"test\", Integer.class);", definition);
}
Aggregations