|
@@ -18,6 +18,8 @@ import scot.carricksoftware.grants.commands.certificates.deathcertificates.Death
|
|
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
|
import static org.mockito.Mockito.verify;
|
|
import static org.mockito.Mockito.verify;
|
|
|
|
|
+import static org.mockito.Mockito.verifyNoInteractions;
|
|
|
|
|
+import static scot.carricksoftware.grants.GenerateRandomPeopleValues.GetRandomPerson;
|
|
|
|
|
|
|
|
@ExtendWith(MockitoExtension.class)
|
|
@ExtendWith(MockitoExtension.class)
|
|
|
class DeathCertificateCommandValidatorTest {
|
|
class DeathCertificateCommandValidatorTest {
|
|
@@ -60,5 +62,14 @@ class DeathCertificateCommandValidatorTest {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Test
|
|
|
|
|
+ public void notNullPersonTest() {
|
|
|
|
|
+ deathCertificateCommand.setDeceased(GetRandomPerson());
|
|
|
|
|
+ commandValidator.validate(deathCertificateCommand, bindingResultMock);
|
|
|
|
|
+
|
|
|
|
|
+ verifyNoInteractions(bindingResultMock);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
}
|
|
}
|