|
|
@@ -0,0 +1,64 @@
|
|
|
+/*
|
|
|
+ * Copyright (c) Andrew Grant of Carrick Software 24/03/2025, 17:31. All rights reserved.
|
|
|
+ *
|
|
|
+ */
|
|
|
+
|
|
|
+package scot.carricksoftware.grants.commands.certificates;
|
|
|
+
|
|
|
+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 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;
|
|
|
+
|
|
|
+class BirthCertificateCommandRegistrationTest {
|
|
|
+
|
|
|
+ private BirthCertificateCommand command;
|
|
|
+
|
|
|
+ @BeforeEach
|
|
|
+ void setUp() {
|
|
|
+ command = new BirthCertificateCommandImpl();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ void getRegistrationAuthorityTest() {
|
|
|
+ assertNull(command.getRegistrationAuthority());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ void setRegistrationAuthorityTest() {
|
|
|
+ Place registrationAuthority = GetRandomPlace();
|
|
|
+ command.setRegistrationAuthority(registrationAuthority);
|
|
|
+ assertEquals(registrationAuthority, command.getRegistrationAuthority());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ void getVolumeTest() {
|
|
|
+ assertNull(command.getVolume());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ void setVolumeTest() {
|
|
|
+ String volume = GetRandomString();
|
|
|
+ command.setVolume(volume);
|
|
|
+ assertEquals(volume, command.getVolume());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ void getNumberTest() {
|
|
|
+ assertNull(command.getNumber());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ void setNumberTest() {
|
|
|
+ String number = GetRandomString();
|
|
|
+ command.setNumber(number);
|
|
|
+ assertEquals(number, command.getNumber());
|
|
|
+ }
|
|
|
+
|
|
|
+}
|