Browse Source

Death certificate gather informant (2)

Andrew Grant 2 tháng trước cách đây
mục cha
commit
fa9bc70aaf
20 tập tin đã thay đổi với 33 bổ sung32 xóa
  1. 1 1
      src/test/java/scot/carricksoftware/grantswriter/controllers/StatusControllerTest.java
  2. 0 1
      src/test/java/scot/carricksoftware/grantswriter/data/TimeLineDataAddCensusEntryTest.java
  3. 0 1
      src/test/java/scot/carricksoftware/grantswriter/domains/census/CensusEntryPartOneTest.java
  4. 3 3
      src/test/java/scot/carricksoftware/grantswriter/domains/certificates/BaseCertificateStringTest.java
  5. 9 9
      src/test/java/scot/carricksoftware/grantswriter/domains/certificates/BaseCertificateTest.java
  6. 0 2
      src/test/java/scot/carricksoftware/grantswriter/domains/certificates/deathcertificate/DeathCertificateMilitaryTest.java
  7. 0 1
      src/test/java/scot/carricksoftware/grantswriter/domains/certificates/deathcertificate/DeathCertificateTimeTest.java
  8. 1 2
      src/test/java/scot/carricksoftware/grantswriter/domains/certificates/deathcertificate/DeathCertificateTwoTest.java
  9. 1 1
      src/test/java/scot/carricksoftware/grantswriter/services/status/StatusServiceTest.java
  10. 7 0
      src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/GatherDeathCertificateTimeLineDataTest.java
  11. 1 1
      src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/birthcertificate/GatherBirthCertificateFatherTimeLineDataFatherTest.java
  12. 1 1
      src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/birthcertificate/GatherBirthCertificateInformantTimeLineDataInformantTest.java
  13. 1 1
      src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/birthcertificate/GatherBirthCertificateMotherTimeLineDataMotherTest.java
  14. 1 1
      src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/birthcertificate/GatherBirthCertificateNewBornTimeLineDataFatherTest.java
  15. 1 1
      src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/birthcertificate/GatherBirthCertificateNewBornTimeLineDataMotherTest.java
  16. 2 2
      src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/birthcertificate/GatherBirthCertificateNewBornTimeLineDataWhenRegisteredTest.java
  17. 1 1
      src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/birthcertificate/GatherBirthCertificateNewBornTimeLineDataWhereBornTest.java
  18. 1 1
      src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/deathcertificate/GatherDeathCertificateDeceasedTimeLineDataWhenNowhereRegisteredTest.java
  19. 1 1
      src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/deathcertificate/GatherDeathCertificateDeceasedTimeLineDataWhenRegisteredTest.java
  20. 1 1
      src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/deathcertificate/GatherDeathCertificateDeceasedTimeLineDataWhereDiedTest.java

+ 1 - 1
src/test/java/scot/carricksoftware/grantswriter/controllers/StatusControllerTest.java

@@ -37,7 +37,7 @@ class StatusControllerTest {
     @Test
     void getStatusAddAttributeTest() {
         controller.getStatus(modelMock);
-        verify(modelMock).addAttribute(AttributeConstants.STATUS_FILE,statusServiceMock.getStatus());
+        verify(modelMock).addAttribute(AttributeConstants.STATUS_FILE, statusServiceMock.getStatus());
     }
 
     @Test

+ 0 - 1
src/test/java/scot/carricksoftware/grantswriter/data/TimeLineDataAddCensusEntryTest.java

@@ -45,5 +45,4 @@ class TimeLineDataAddCensusEntryTest {
     }
 
 
-
 }

+ 0 - 1
src/test/java/scot/carricksoftware/grantswriter/domains/census/CensusEntryPartOneTest.java

@@ -82,5 +82,4 @@ class CensusEntryPartOneTest {
     }
 
 
-
 }

+ 3 - 3
src/test/java/scot/carricksoftware/grantswriter/domains/certificates/BaseCertificateStringTest.java

@@ -37,7 +37,7 @@ class BaseCertificateStringTest {
 
 
     @Test
-    void getCertificateDateTest(){
+    void getCertificateDateTest() {
         assertNull(baseCertificate.getCertificateDate());
     }
 
@@ -48,7 +48,7 @@ class BaseCertificateStringTest {
     }
 
     @Test
-    void getVolumeTest(){
+    void getVolumeTest() {
         assertNull(baseCertificate.getVolume());
     }
 
@@ -59,7 +59,7 @@ class BaseCertificateStringTest {
     }
 
     @Test
-    void getNumberTest(){
+    void getNumberTest() {
         assertNull(baseCertificate.getNumber());
     }
 

+ 9 - 9
src/test/java/scot/carricksoftware/grantswriter/domains/certificates/BaseCertificateTest.java

@@ -24,43 +24,43 @@ class BaseCertificateTest {
     }
 
     @Test
-    void getCertificateSourceTest(){
+    void getCertificateSourceTest() {
         assertNull(baseCertificate.getCertificateSource());
     }
 
     @Test
-    void setCertificateSourceTest(){
+    void setCertificateSourceTest() {
         Organisation organisation = new Organisation();
         baseCertificate.setCertificateSource(organisation);
-        assertEquals(organisation,baseCertificate.getCertificateSource());
+        assertEquals(organisation, baseCertificate.getCertificateSource());
     }
 
     @Test
-    void getCertificateDateTest(){
+    void getCertificateDateTest() {
         assertNull(baseCertificate.getCertificateDate());
     }
 
     @Test
-    void getCertificateTypeTest(){
+    void getCertificateTypeTest() {
         assertNull(baseCertificate.getCertificateType());
     }
 
     @Test
-    void setCertificateTypeTest(){
+    void setCertificateTypeTest() {
         baseCertificate.setCertificateType(CertificateType.COPY);
         assertEquals(CertificateType.COPY, baseCertificate.getCertificateType());
     }
 
     @Test
-    void getRegistrationAuthorityTest(){
+    void getRegistrationAuthorityTest() {
         assertNull(baseCertificate.getRegistrationAuthority());
     }
 
     @Test
-    void setRegistrationAuthorityTest(){
+    void setRegistrationAuthorityTest() {
         Organisation organisation = new Organisation();
         baseCertificate.setRegistrationAuthority(organisation);
-        assertEquals(organisation,baseCertificate.getRegistrationAuthority());
+        assertEquals(organisation, baseCertificate.getRegistrationAuthority());
     }
 
 

+ 0 - 2
src/test/java/scot/carricksoftware/grantswriter/domains/certificates/deathcertificate/DeathCertificateMilitaryTest.java

@@ -59,6 +59,4 @@ class DeathCertificateMilitaryTest {
     }
 
 
-
-
 }

+ 0 - 1
src/test/java/scot/carricksoftware/grantswriter/domains/certificates/deathcertificate/DeathCertificateTimeTest.java

@@ -72,5 +72,4 @@ class DeathCertificateTimeTest {
     }
 
 
-
 }

+ 1 - 2
src/test/java/scot/carricksoftware/grantswriter/domains/certificates/deathcertificate/DeathCertificateTwoTest.java

@@ -21,7 +21,7 @@ class DeathCertificateTwoTest {
     void setUp() {
         deathCertificate = new DeathCertificate();
     }
-    
+
     @Test
     void getCauseOfDeathTest() {
         assertNull(deathCertificate.getCauseOfDeath());
@@ -47,5 +47,4 @@ class DeathCertificateTwoTest {
     }
 
 
-
 }

+ 1 - 1
src/test/java/scot/carricksoftware/grantswriter/services/status/StatusServiceTest.java

@@ -39,7 +39,7 @@ class StatusServiceTest {
 
     @Test
     void ReturnTestTest() {
-        assertEquals(8,statusService.getStatus().size() );
+        assertEquals(8, statusService.getStatus().size());
     }
 
     @Test

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

@@ -70,4 +70,11 @@ class GatherDeathCertificateTimeLineDataTest {
         verifyNoInteractions(gatherDeathCertificateDeceasedTimeLineDataMock);
     }
 
+    @Test
+    void informantTest() {
+        when(deathCertificateServiceMock.findAllByInformant(person)).thenReturn(deathCertificates);
+        gatherDeathCertificateTimeLineData.gather(person);
+        verify(gatherDeathCertificateInformantTimeLineDataMock).gather(deathCertificates);
+    }
+
 }

+ 1 - 1
src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/birthcertificate/GatherBirthCertificateFatherTimeLineDataFatherTest.java

@@ -35,7 +35,7 @@ class GatherBirthCertificateFatherTimeLineDataFatherTest {
 
     private List<BirthCertificate> birthCertificates;
 
-    private TreeMap<DMY, List<String>> timeLine ;
+    private TreeMap<DMY, List<String>> timeLine;
 
     private BirthCertificate birthCertificate;
 

+ 1 - 1
src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/birthcertificate/GatherBirthCertificateInformantTimeLineDataInformantTest.java

@@ -34,7 +34,7 @@ class GatherBirthCertificateInformantTimeLineDataInformantTest {
 
     private List<BirthCertificate> birthCertificates;
 
-    private TreeMap<DMY, List<String>> timeLine ;
+    private TreeMap<DMY, List<String>> timeLine;
 
     private BirthCertificate birthCertificate;
 

+ 1 - 1
src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/birthcertificate/GatherBirthCertificateMotherTimeLineDataMotherTest.java

@@ -33,7 +33,7 @@ class GatherBirthCertificateMotherTimeLineDataMotherTest {
 
     private List<BirthCertificate> birthCertificates;
 
-    private TreeMap<DMY, List<String>> timeLine ;
+    private TreeMap<DMY, List<String>> timeLine;
 
     private BirthCertificate birthCertificate;
 

+ 1 - 1
src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/birthcertificate/GatherBirthCertificateNewBornTimeLineDataFatherTest.java

@@ -33,7 +33,7 @@ class GatherBirthCertificateNewBornTimeLineDataFatherTest {
 
     private List<BirthCertificate> birthCertificates;
 
-    private TreeMap<DMY, List<String>> timeLine ;
+    private TreeMap<DMY, List<String>> timeLine;
 
     private BirthCertificate birthCertificate;
 

+ 1 - 1
src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/birthcertificate/GatherBirthCertificateNewBornTimeLineDataMotherTest.java

@@ -33,7 +33,7 @@ class GatherBirthCertificateNewBornTimeLineDataMotherTest {
 
     private List<BirthCertificate> birthCertificates;
 
-    private TreeMap<DMY, List<String>> timeLine ;
+    private TreeMap<DMY, List<String>> timeLine;
 
     private BirthCertificate birthCertificate;
 

+ 2 - 2
src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/birthcertificate/GatherBirthCertificateNewBornTimeLineDataWhenRegisteredTest.java

@@ -36,7 +36,7 @@ class GatherBirthCertificateNewBornTimeLineDataWhenRegisteredTest {
 
     private List<BirthCertificate> birthCertificates;
 
-    private TreeMap<DMY, List<String>> timeLine ;
+    private TreeMap<DMY, List<String>> timeLine;
 
     private BirthCertificate birthCertificate;
 
@@ -90,7 +90,7 @@ class GatherBirthCertificateNewBornTimeLineDataWhenRegisteredTest {
         when(timelineDataMock.getTimeLine()).thenReturn(timeLine);
 
         gatherBirthCertificateNewBornTimeLineData.gather(birthCertificates);
-        String expected = "Birth Registered by " + untrackedInformant + " at "+ whereRegistered;
+        String expected = "Birth Registered by " + untrackedInformant + " at " + whereRegistered;
         assertTrue(timeLine.firstEntry().getValue().contains(expected));
     }
 }

+ 1 - 1
src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/birthcertificate/GatherBirthCertificateNewBornTimeLineDataWhereBornTest.java

@@ -35,7 +35,7 @@ class GatherBirthCertificateNewBornTimeLineDataWhereBornTest {
 
     private List<BirthCertificate> birthCertificates;
 
-    private TreeMap<DMY, List<String>> timeLine ;
+    private TreeMap<DMY, List<String>> timeLine;
 
     private BirthCertificate birthCertificate;
 

+ 1 - 1
src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/deathcertificate/GatherDeathCertificateDeceasedTimeLineDataWhenNowhereRegisteredTest.java

@@ -40,7 +40,7 @@ class GatherDeathCertificateDeceasedTimeLineDataWhenNowhereRegisteredTest {
     private List<DeathCertificate> deathCertificates;
 
     @Mock
-    private TreeMap<DMY, List<String>> timeLineMock ;
+    private TreeMap<DMY, List<String>> timeLineMock;
 
     private Person deceased;
 

+ 1 - 1
src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/deathcertificate/GatherDeathCertificateDeceasedTimeLineDataWhenRegisteredTest.java

@@ -38,7 +38,7 @@ class GatherDeathCertificateDeceasedTimeLineDataWhenRegisteredTest {
 
     private List<DeathCertificate> deathCertificates;
 
-    private TreeMap<DMY, List<String>> timeLine ;
+    private TreeMap<DMY, List<String>> timeLine;
 
     private Place place;
 

+ 1 - 1
src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/level2/deathcertificate/GatherDeathCertificateDeceasedTimeLineDataWhereDiedTest.java

@@ -37,7 +37,7 @@ class GatherDeathCertificateDeceasedTimeLineDataWhereDiedTest {
 
     private List<DeathCertificate> deathCertificates;
 
-    private TreeMap<DMY, List<String>> timeLine ;
+    private TreeMap<DMY, List<String>> timeLine;
 
     private Place place;