|
|
@@ -0,0 +1,49 @@
|
|
|
+/*
|
|
|
+ * Copyright (c) 2025. Andrew Grant Carrick Software. All rights reserved
|
|
|
+ *
|
|
|
+ */
|
|
|
+
|
|
|
+package scot.carricksoftware.grants.commands.places.organisations;
|
|
|
+
|
|
|
+import org.junit.jupiter.api.BeforeEach;
|
|
|
+import org.junit.jupiter.api.Test;
|
|
|
+
|
|
|
+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.GenerateRandomNumberValues.GetRandomLong;
|
|
|
+
|
|
|
+
|
|
|
+class OrganisationCommandTest {
|
|
|
+
|
|
|
+ private OrganisationCommand command;
|
|
|
+
|
|
|
+ @BeforeEach
|
|
|
+ void setUp() {
|
|
|
+ command = new OrganisationCommandImpl();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void getIdTest() {
|
|
|
+ assertNull(command.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void setIdTest() {
|
|
|
+ Long Id = GetRandomLong();
|
|
|
+ command.setId(Id);
|
|
|
+ assertEquals(Id, command.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void getNameTest() {
|
|
|
+ assertNull(command.getName());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void setNameTest() {
|
|
|
+ String name = GetRandomString();
|
|
|
+ command.setName(name);
|
|
|
+ assertEquals(name, command.getName());
|
|
|
+ }
|
|
|
+}
|