Quellcode durchsuchen

DeathCertificateServiceTest

Andrew Grant vor 2 Monaten
Ursprung
Commit
288c53cae3

+ 16 - 0
src/test/java/scot/carricksoftware/grantswriter/services/certificates/deathcertificate/DeathCertificateServiceTest.java

@@ -49,4 +49,20 @@ class DeathCertificateServiceTest {
         List<DeathCertificate> result = deathCertificateService.findAllByInformant(person);
         assertEquals(deathCertificateList, result);
     }
+
+    @Test
+    void findAllByDeceasedTest() {
+        when(deathCertificateRepositoryMock.findAllByDeceased(person)).thenReturn(deathCertificateList);
+
+        List<DeathCertificate> result = deathCertificateService.findAllByDeceased(person);
+        assertEquals(deathCertificateList, result);
+    }
+
+    @Test
+    void findAllBySpouseTest() {
+        when(deathCertificateRepositoryMock.findAllBySpouse(person)).thenReturn(deathCertificateList);
+
+        List<DeathCertificate> result = deathCertificateService.findAllBySpouse(person);
+        assertEquals(deathCertificateList, result);
+    }
 }