* @throws Exception
*/
@Test
public void testPrimitiveProperties() throws Exception {
// Given: @formatter:off
TypeM pojoType = new TypeM("com.example.output", "Sample");
BuilderM builder = new BuilderM();
builder.setPojoType(pojoType);
builder.setProperties( new PropertyListM(
new PropertyM("someBoolean", PrimitiveTypeM.BOOLEAN)
.accessibleVia(new FieldAccessM(EnumSet.of(PUBLIC)))
.withMethodNamePattern("with*"),
new PropertyM("someChar", PrimitiveTypeM.CHAR)
.accessibleVia(new FieldAccessM(EnumSet.of(PUBLIC)))
.withMethodNamePattern("with*"),
new PropertyM("someByte", PrimitiveTypeM.BYTE)
.accessibleVia(new FieldAccessM(EnumSet.of(PUBLIC)))
.withMethodNamePattern("with*"),
new PropertyM("someShort", PrimitiveTypeM.SHORT)
.accessibleVia(new FieldAccessM(EnumSet.of(PUBLIC)))
.withMethodNamePattern("with*"),
new PropertyM("someInt", PrimitiveTypeM.INT)
.accessibleVia(new FieldAccessM(EnumSet.of(PUBLIC)))
.withMethodNamePattern("with*"),
new PropertyM("someLong", PrimitiveTypeM.LONG)
.accessibleVia(new FieldAccessM(EnumSet.of(PUBLIC)))
.withMethodNamePattern("with*"),
new PropertyM("someFloat", PrimitiveTypeM.FLOAT)
.accessibleVia(new FieldAccessM(EnumSet.of(PUBLIC)))
.withMethodNamePattern("with*"),
new PropertyM("someDouble", PrimitiveTypeM.DOUBLE)
.accessibleVia(new FieldAccessM(EnumSet.of(PUBLIC)))
.withMethodNamePattern("with*")
));
builder.setType(new TypeM("com.example.output","SampleBuilder"));
builder.setSelfType(builder.getType());
builder.setBuildMethod( new BuildMethodM());
// When:
underTest.generateSource(builder);