|
@@ -17,6 +17,7 @@ import scot.carricksoftware.grants.services.places.places.PlaceService;
|
|
|
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.when;
|
|
import static org.mockito.Mockito.when;
|
|
|
|
|
+import static scot.carricksoftware.grants.GenerateRandomPeopleValues.GetRandomPerson;
|
|
|
|
|
|
|
|
|
|
|
|
|
@ExtendWith(MockitoExtension.class)
|
|
@ExtendWith(MockitoExtension.class)
|
|
@@ -40,15 +41,15 @@ public class DataLoadCertificatesDeathCertificatesTest {
|
|
|
private PlaceService placeServiceMock;
|
|
private PlaceService placeServiceMock;
|
|
|
|
|
|
|
|
@SuppressWarnings("unused")
|
|
@SuppressWarnings("unused")
|
|
|
- private Person father;
|
|
|
|
|
|
|
+ private final Person father = GetRandomPerson();
|
|
|
@SuppressWarnings("unused")
|
|
@SuppressWarnings("unused")
|
|
|
- private Person mother;
|
|
|
|
|
|
|
+ private final Person mother = GetRandomPerson();
|
|
|
@SuppressWarnings("unused")
|
|
@SuppressWarnings("unused")
|
|
|
- private Person deceased;
|
|
|
|
|
|
|
+ private final Person deceased = GetRandomPerson();
|
|
|
@SuppressWarnings("unused")
|
|
@SuppressWarnings("unused")
|
|
|
- private Person spouse;
|
|
|
|
|
|
|
+ private final Person spouse= GetRandomPerson();
|
|
|
@SuppressWarnings("unused")
|
|
@SuppressWarnings("unused")
|
|
|
- private Person informant;
|
|
|
|
|
|
|
+ private final Person informant = GetRandomPerson();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -71,11 +72,10 @@ public class DataLoadCertificatesDeathCertificatesTest {
|
|
|
|
|
|
|
|
dataLoadCertificates.load();
|
|
dataLoadCertificates.load();
|
|
|
verify(deathCertificateServiceMock).saveDeathCertificateCommand(captor.capture());
|
|
verify(deathCertificateServiceMock).saveDeathCertificateCommand(captor.capture());
|
|
|
|
|
+ var debug = captor.getValue();
|
|
|
assertEquals(deceased, captor.getValue().getDeceased());
|
|
assertEquals(deceased, captor.getValue().getDeceased());
|
|
|
assertEquals(father, captor.getValue().getFather());
|
|
assertEquals(father, captor.getValue().getFather());
|
|
|
- assertEquals(mother, captor.getValue().getMother());
|
|
|
|
|
- assertEquals(spouse, captor.getValue().getSpouse());
|
|
|
|
|
- assertEquals(informant, captor.getValue().getInformant());
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|