ForgePropertyStyle propertyStyle = new ForgePropertyStyle(new ForgePropertyStyleConfig().setProject(project));
Map<String, Property> properties = propertyStyle
.getProperties("org.jboss.forge.addon.scaffold.metawidget.inspector.propertystyle.MockAnnotatedClass");
Property property = properties.get("mockAnnotatedProperty");
MockAnnotationSimple mockAnnotationSimple = property.getAnnotation(MockAnnotationSimple.class);
assertEquals(MockAnnotationSimple.class, mockAnnotationSimple.annotationType());
assertEquals((byte) 1, mockAnnotationSimple.aByte());
assertEquals((short) 2, mockAnnotationSimple.aShort());
assertEquals(3, mockAnnotationSimple.anInt());
assertEquals(4l, mockAnnotationSimple.aLong());
assertEquals(5f, mockAnnotationSimple.aFloat(), 0.01);
assertEquals(0d, mockAnnotationSimple.aDouble(), 0.01);
assertEquals('a', mockAnnotationSimple.aChar());
assertEquals(false, mockAnnotationSimple.aBoolean());
assertEquals("", mockAnnotationSimple.aString());
testMockAnnotationComplex(property);
// Test custom private field convention
propertyStyle = new ForgePropertyStyle(new ForgePropertyStyleConfig().setProject(project)
.setPrivateFieldConvention(new MessageFormat("m{1}")));
properties = propertyStyle
.getProperties("org.jboss.forge.addon.scaffold.metawidget.inspector.propertystyle.MockAnnotatedClass");
property = properties.get("mockAnnotatedProperty");
mockAnnotationSimple = property.getAnnotation(MockAnnotationSimple.class);
assertEquals(MockAnnotationSimple.class, mockAnnotationSimple.annotationType());
assertEquals((byte) 0, mockAnnotationSimple.aByte());
assertEquals((short) 0, mockAnnotationSimple.aShort());
assertEquals(0, mockAnnotationSimple.anInt());
assertEquals(0l, mockAnnotationSimple.aLong());