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:
committed by
Grzegorz Piwowarek
parent
d1bd04d2dc
commit
ea85fa99ee
+22
@@ -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());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user