|
|
@@ -30,8 +30,9 @@ class BirthCertificateCommandPartOneValidatorTest {
|
|
|
@Mock
|
|
|
private ValidateTypes validateTypesMock;
|
|
|
|
|
|
+
|
|
|
@Mock()
|
|
|
- BirthCertificateCommand birthCertificateCommandMock;
|
|
|
+ private BirthCertificateCommand birthCertificateCommandMock;
|
|
|
|
|
|
@Mock
|
|
|
private BindingResult bindingResultMock;
|
|
|
@@ -85,5 +86,13 @@ class BirthCertificateCommandPartOneValidatorTest {
|
|
|
bindingResultMock);
|
|
|
}
|
|
|
|
|
|
+ @Test
|
|
|
+ void MotherTest() {
|
|
|
+ Person mother = new Person();
|
|
|
+ when(birthCertificateCommandMock.getMother()).thenReturn(mother);
|
|
|
+ validator.validate(birthCertificateCommandMock, bindingResultMock);
|
|
|
+ verify(validateTypesMock).validatePerson(mother, "mother", "The mother cannot be null.", bindingResultMock);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|