@Test public void testTooYoung(){ User user = getAValidUser(); user.setDateOfBirth(LocalDate.of(2014, 1, 1)); assertTrue(hasViolations(user)); assertFalse(persistInATransaction(user)); }
public void setDateOfBirth(LocalDate dateOfBirth) { this.dateOfBirth = dateOfBirth; }
User { public void setDateOfBirth(LocalDate dateOfBirth) { this.dateOfBirth = dateOfBirth; } }
User { public void setDateOfBirth(LocalDate dateOfBirth) { this.dateOfBirth = dateOfBirth; } User(); }
User { public void setDateOfBirth(LocalDate dateOfBirth) { this.dateOfBirth = dateOfBirth; } User(); Long getId(); void setId(Long id); String getName(); void setName(String name); String getMiddleName(); void setMiddleName(String middleName); String getSurname(); void setSurname(String surname); LocalDate getDateOfRegistration(); void setDateOfRegistration(LocalDate dateOfRegistration); LocalDate getDateOfBirth(); void setDateOfBirth(LocalDate dateOfBirth); String getEmail(); void setEmail(String email); }
User { public void setDateOfBirth(LocalDate dateOfBirth) { this.dateOfBirth = dateOfBirth; } User(); Long getId(); void setId(Long id); String getName(); void setName(String name); String getMiddleName(); void setMiddleName(String middleName); String getSurname(); void setSurname(String surname); LocalDate getDateOfRegistration(); void setDateOfRegistration(LocalDate dateOfRegistration); LocalDate getDateOfBirth(); void setDateOfBirth(LocalDate dateOfBirth); String getEmail(); void setEmail(String email);  }