BAEL-2990 Automatic generation of the Builder pattern with FreeBuilder

This commit is contained in:
Chirag Dewan 2019-07-29 21:15:24 +05:30
parent 3b3a0fcd67
commit f71224ed2c
1 changed files with 3 additions and 2 deletions

View File

@ -86,13 +86,14 @@ public class EmployeeBuilderUnitTest {
.setEmail("abc@xyz.com") .setEmail("abc@xyz.com")
.setSupervisorName("Admin") .setSupervisorName("Admin")
.setPhoneNumber(4445566) .setPhoneNumber(4445566)
.setNullablePermanent(null) .setPermanent(true)
.setDateOfJoining(Optional.empty())
.setRole("developer") .setRole("developer")
.setAddress(address) .setAddress(address)
.build(); .build();
// then // then
assertTrue(employee.getPermanent().isPresent());
assertTrue(employee.getPermanent().get());
assertFalse(employee.getDateOfJoining().isPresent()); assertFalse(employee.getDateOfJoining().isPresent());
} }