浏览代码

In certificates, registratio authority changed to organisation

Andrew Grant 6 月之前
父节点
当前提交
72c5453796

+ 2 - 3
src/main/java/scot/carricksoftware/grants/commands/certificates/birthcertificates/BirthCertificateCommand.java

@@ -7,7 +7,6 @@ package scot.carricksoftware.grants.commands.certificates.birthcertificates;
 
 import scot.carricksoftware.grants.domains.people.Person;
 import scot.carricksoftware.grants.domains.places.Organisation;
-import scot.carricksoftware.grants.domains.places.Place;
 import scot.carricksoftware.grants.enums.certificates.CertificateType;
 
 public interface BirthCertificateCommand {
@@ -42,9 +41,9 @@ public interface BirthCertificateCommand {
 
     void setCertificateType(CertificateType certificateType);
 
-    Place getRegistrationAuthority();
+    Organisation getRegistrationAuthority();
 
-    void setRegistrationAuthority(Place registrationAuthority);
+    void setRegistrationAuthority(Organisation registrationAuthority);
 
     String getVolume();
 

+ 3 - 4
src/main/java/scot/carricksoftware/grants/commands/certificates/birthcertificates/BirthCertificateCommandImpl.java

@@ -7,7 +7,6 @@ package scot.carricksoftware.grants.commands.certificates.birthcertificates;
 
 import scot.carricksoftware.grants.domains.people.Person;
 import scot.carricksoftware.grants.domains.places.Organisation;
-import scot.carricksoftware.grants.domains.places.Place;
 import scot.carricksoftware.grants.enums.certificates.CertificateType;
 
 public class BirthCertificateCommandImpl implements BirthCertificateCommand {
@@ -24,7 +23,7 @@ public class BirthCertificateCommandImpl implements BirthCertificateCommand {
 
     private CertificateType certificateType;
 
-    private Place registrationAuthority;
+    private Organisation registrationAuthority;
 
     private String volume;
 
@@ -91,12 +90,12 @@ public class BirthCertificateCommandImpl implements BirthCertificateCommand {
     }
 
     @Override
-    public Place getRegistrationAuthority() {
+    public Organisation getRegistrationAuthority() {
         return registrationAuthority;
     }
 
     @Override
-    public void setRegistrationAuthority(Place registrationAuthority) {
+    public void setRegistrationAuthority(Organisation registrationAuthority) {
         this.registrationAuthority = registrationAuthority;
     }
 

+ 3 - 4
src/main/java/scot/carricksoftware/grants/domains/certificates/BaseCertificate.java

@@ -16,7 +16,6 @@ import org.springframework.format.annotation.DateTimeFormat;
 import scot.carricksoftware.grants.BaseEntity;
 import scot.carricksoftware.grants.constants.ApplicationConstants;
 import scot.carricksoftware.grants.domains.places.Organisation;
-import scot.carricksoftware.grants.domains.places.Place;
 import scot.carricksoftware.grants.enums.certificates.CertificateType;
 
 
@@ -40,7 +39,7 @@ public class BaseCertificate extends BaseEntity {
 
     @ManyToOne
     @JoinColumn(name = "`registration_authority`")
-    private Place registrationAuthority;
+    private Organisation registrationAuthority;
 
     @Column(name = "`volume`")
     private String volume;
@@ -85,11 +84,11 @@ public class BaseCertificate extends BaseEntity {
         this.certificateType = certificateType;
     }
 
-    public Place getRegistrationAuthority() {
+    public Organisation getRegistrationAuthority() {
         return registrationAuthority;
     }
 
-    public void setRegistrationAuthority(Place registrationAuthority) {
+    public void setRegistrationAuthority(Organisation registrationAuthority) {
         this.registrationAuthority = registrationAuthority;
     }
 

+ 3 - 3
src/test/java/scot/carricksoftware/grants/commands/certificates/BirthCertificateCommandRegistrationTest.java

@@ -9,12 +9,12 @@ import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import scot.carricksoftware.grants.commands.certificates.birthcertificates.BirthCertificateCommand;
 import scot.carricksoftware.grants.commands.certificates.birthcertificates.BirthCertificateCommandImpl;
-import scot.carricksoftware.grants.domains.places.Place;
+import scot.carricksoftware.grants.domains.places.Organisation;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
-import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomPlace;
+import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomOrganisation;
 
 class BirthCertificateCommandRegistrationTest {
 
@@ -32,7 +32,7 @@ class BirthCertificateCommandRegistrationTest {
 
     @Test
     void setRegistrationAuthorityTest() {
-        Place registrationAuthority = GetRandomPlace();
+        Organisation registrationAuthority = GetRandomOrganisation();
         command.setRegistrationAuthority(registrationAuthority);
         assertEquals(registrationAuthority, command.getRegistrationAuthority());
     }

+ 3 - 3
src/test/java/scot/carricksoftware/grants/domains/certificates/BirthCertificateRegistrationTest.java

@@ -8,12 +8,12 @@ package scot.carricksoftware.grants.domains.certificates;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
-import scot.carricksoftware.grants.domains.places.Place;
+import scot.carricksoftware.grants.domains.places.Organisation;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
-import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomPlace;
+import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomOrganisation;
 
 
 class BirthCertificateRegistrationTest {
@@ -32,7 +32,7 @@ class BirthCertificateRegistrationTest {
 
     @Test
     void setRegistrationAuthorityTest() {
-        Place registrationAuthority = GetRandomPlace();
+        Organisation registrationAuthority = GetRandomOrganisation();
         certificate.setRegistrationAuthority(registrationAuthority);
         assertEquals(registrationAuthority, certificate.getRegistrationAuthority());
     }