瀏覽代碼

Death Certificate add base certificate attributes Tests (2)

Andrew Grant 4 月之前
父節點
當前提交
8afaf3f85c

+ 38 - 0
src/test/java/scot/carricksoftware/grants/domains/certificates/death/DeathCertificateStringTest.java

@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grants.domains.certificates.death;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
+
+
+class DeathCertificateStringTest {
+
+    private DeathCertificate deathCertificate;
+
+    @BeforeEach
+    void setUp() {
+        deathCertificate = new DeathCertificate();
+    }
+
+    @Test
+    void getNumberTest() {
+        assertNull(deathCertificate.getNumber());
+    }
+
+    @Test
+    void setNumberTest() {
+        String number = GetRandomString();
+        deathCertificate.setNumber(number);
+        assertEquals(number, deathCertificate.getNumber());
+    }
+
+}