|
@@ -7,7 +7,10 @@ package scot.carricksoftware.grantswriter.domains.certificates;
|
|
|
|
|
|
import org.junit.jupiter.api.BeforeEach;
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
+import scot.carricksoftware.grantswriter.domains.places.Organisation;
|
|
|
+import scot.carricksoftware.grantswriter.enums.certificates.CertificateType;
|
|
|
|
|
|
+import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
|
import static org.junit.jupiter.api.Assertions.assertNull;
|
|
|
|
|
|
|
|
@@ -25,6 +28,13 @@ class BaseCertificateTest {
|
|
|
assertNull(baseCertificate.getCertificateSource());
|
|
|
}
|
|
|
|
|
|
+ @Test
|
|
|
+ void setCertificateSourceTest(){
|
|
|
+ Organisation organisation = new Organisation();
|
|
|
+ baseCertificate.setCertificateSource(organisation);
|
|
|
+ assertEquals(organisation,baseCertificate.getCertificateSource());
|
|
|
+ }
|
|
|
+
|
|
|
@Test
|
|
|
void getCertificateDateTest(){
|
|
|
assertNull(baseCertificate.getCertificateDate());
|
|
@@ -35,10 +45,23 @@ class BaseCertificateTest {
|
|
|
assertNull(baseCertificate.getCertificateType());
|
|
|
}
|
|
|
|
|
|
+ @Test
|
|
|
+ void setCertificateTypeTest(){
|
|
|
+ baseCertificate.setCertificateType(CertificateType.COPY);
|
|
|
+ assertEquals(CertificateType.COPY, baseCertificate.getCertificateType());
|
|
|
+ }
|
|
|
+
|
|
|
@Test
|
|
|
void getRegistrationAuthorityTest(){
|
|
|
assertNull(baseCertificate.getRegistrationAuthority());
|
|
|
}
|
|
|
|
|
|
+ @Test
|
|
|
+ void setRegistrationAuthorityTest(){
|
|
|
+ Organisation organisation = new Organisation();
|
|
|
+ baseCertificate.setRegistrationAuthority(organisation);
|
|
|
+ assertEquals(organisation,baseCertificate.getRegistrationAuthority());
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|