Quellcode durchsuchen

GatherBirthCertificateTimeLineDataTest::gatherFatherTest

Andrew Grant vor 2 Monaten
Ursprung
Commit
eec2cc7a95

+ 9 - 0
src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/GatherBirthCertificateTimeLineDataTest.java

@@ -67,4 +67,13 @@ class GatherBirthCertificateTimeLineDataTest {
         gatherBirthCertificateTimeLineData.gather(person);
         verifyNoInteractions(gatherBirthCertificateNewBornTimeLineDataMock);
     }
+
+    @Test
+    void gatherBirthCertificateFatherIsCalledTest() {
+        List<BirthCertificate> birthCertificates = new ArrayList<>();
+        Person person = GetRandomPerson();
+        when(birthCertificateServiceMock.findAllByNewBorn(person)).thenReturn(birthCertificates);
+        gatherBirthCertificateTimeLineData.gather(person);
+        verify(gatherBirthCertificateFatherTimeLineDataMock).gather(birthCertificates);
+    }
 }