Browse Source

DocumentTextCommandTest

apg 2 weeks ago
parent
commit
2fb17ebb1c

+ 49 - 0
src/test/java/scot/carricksoftware/grants/commands/text/DocumentTextCommandTest.java

@@ -10,6 +10,7 @@ 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 DocumentTextCommandTest {
@@ -33,5 +34,53 @@ class DocumentTextCommandTest {
         assertEquals(id, documentTextCommand.getId());
     }
 
+    @Test
+    void getLevelTest() {
+        assertNull(documentTextCommand.getLevel());
+    }
+
+    @Test
+    void setLevelTest() {
+        String level = GetRandomString();
+        documentTextCommand.setLevel(level);
+        assertEquals(level, documentTextCommand.getLevel());
+    }
+
+    @Test
+    void getOrderTest() {
+        assertNull(documentTextCommand.getOrder());
+    }
+
+    @Test
+    void setOrderTest() {
+        String order = GetRandomString();
+        documentTextCommand.setOrder(order);
+        assertEquals(order, documentTextCommand.getOrder());
+    }
+
+    @Test
+    void getHeadingTest() {
+        assertNull(documentTextCommand.getHeading());
+    }
+
+    @Test
+    void setHeadingTest() {
+        String heading = GetRandomString();
+        documentTextCommand.setHeading(heading);
+        assertEquals(heading, documentTextCommand.getHeading());
+    }
+
+    @Test
+    void getContentTest() {
+        assertNull(documentTextCommand.getContent());
+    }
+
+    @Test
+    void setContentTest() {
+        String content = GetRandomString();
+        documentTextCommand.setContent(content);
+        assertEquals(content, documentTextCommand.getContent());
+    }
+
 
 }