Added samples for annotation processing article. (#705)

* Added annotation processing examples. Fixed core-java8 build on OS X

* Moved projects to separate submodule
This commit is contained in:
Sergey Petunin
2016-09-28 19:24:03 +05:00
committed by Grzegorz Piwowarek
parent d1bd04d2dc
commit ea85fa99ee
11 changed files with 319 additions and 14 deletions
@@ -0,0 +1,22 @@
package com.baeldung.annotation;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class PersonBuilderTest {
@Test
public void whenBuildPersonWithBuilder_thenObjectHasPropertyValues() {
Person person = new PersonBuilder()
.setAge(25)
.setName("John")
.build();
assertEquals(25, person.getAge());
assertEquals("John", person.getName());
}
}