Prechádzať zdrojové kódy

DeathCertificateCommandValidatorTest - not a null person

Andrew Grant 7 mesiacov pred
rodič
commit
b2bd84e606

+ 11 - 0
src/test/java/scot/carricksoftware/grants/validators/certificates/DeathCertificateCommandValidatorTest.java

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