Эх сурвалжийг харах

GatherBirthCertificateTimeLineDataTest::gatherBirthCertificateMother

Andrew Grant 2 сар өмнө
parent
commit
77cb62fc35

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

@@ -77,8 +77,17 @@ class GatherBirthCertificateTimeLineDataTest {
     void gatherBirthCertificateFatherIsCalledTest() {
         List<BirthCertificate> birthCertificates = new ArrayList<>();
         Person person = GetRandomPerson();
-        when(birthCertificateServiceMock.findAllByNewBorn(person)).thenReturn(birthCertificates);
+        when(birthCertificateServiceMock.findAllByFather(person)).thenReturn(birthCertificates);
         gatherBirthCertificateTimeLineData.gather(person);
         verify(gatherBirthCertificateFatherTimeLineDataMock).gather(birthCertificates);
     }
+
+    @Test
+    void gatherBirthCertificateMotherIsCalledTest() {
+        List<BirthCertificate> birthCertificates = new ArrayList<>();
+        Person person = GetRandomPerson();
+        when(birthCertificateServiceMock.findAllByMother(person)).thenReturn(birthCertificates);
+        gatherBirthCertificateTimeLineData.gather(person);
+        verify(gatherBirthCertificateMotherTimeLineDataMock).gather(birthCertificates);
+    }
 }