Andrew Grant 3 сар өмнө
parent
commit
fb66f1e6ea

+ 1 - 1
src/main/java/scot/carricksoftware/grantswriter/constants/LatexConstants.java

@@ -15,7 +15,7 @@ public class LatexConstants {
     }
     }
 
 
     @SuppressWarnings("SpellCheckingInspection")
     @SuppressWarnings("SpellCheckingInspection")
-    public static final String DOCUMENT_CLASS = "\\documentclass[a4paper,11pt]{memoir}";
+    public static final String DOCUMENT_CLASS = "\\documentclass[a4paper,11pt, twoside]{memoir}";
     public static final String DOCUMENT_START = "\\begin{document}";
     public static final String DOCUMENT_START = "\\begin{document}";
     public static final String DOCUMENT_END = "\\end{document}";
     public static final String DOCUMENT_END = "\\end{document}";
     @SuppressWarnings("SpellCheckingInspection")
     @SuppressWarnings("SpellCheckingInspection")

+ 0 - 26
src/test/java/scot/carricksoftware/grantswriter/data/DMYParseTest.java

@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
- *
- */
-
-package scot.carricksoftware.grantswriter.data;
-
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-class DMYParseTest {
-
-    private DMY dmy;
-    @BeforeEach
-
-    void setUp() {
-        dmy = new DMYImpl();
-    }
-
-   @Test
-    void constructorTest() {
-        assertNotNull(dmy);
-   }
-}

+ 66 - 0
src/test/java/scot/carricksoftware/grantswriter/data/DMYSetterAndGetterTest.java

@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grantswriter.data;
+
+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.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static scot.carricksoftware.grantswriter.GenerateCertificateRandomValues.GetRandomString;
+
+class DMYSetterAndGetterTest {
+
+    private DMY dmy;
+    @BeforeEach
+
+    void setUp() {
+        dmy = new DMYImpl();
+    }
+
+   @Test
+    void constructorTest() {
+        assertNotNull(dmy);
+   }
+
+   @Test
+    void getDayTest() {
+        assertNull(dmy.getDay());
+   }
+
+    @Test
+    void setDayTest() {
+        String day = GetRandomString();
+        dmy.setDay(day);
+        assertEquals(day, dmy.getDay());
+    }
+
+    @Test
+    void getMonthTest() {
+        assertNull(dmy.getMonth());
+    }
+
+    @Test
+    void setMonthTest() {
+        String month = GetRandomString();
+        dmy.setMonth(month);
+        assertEquals(month, dmy.getMonth());
+    }
+
+    @Test
+    void getYearTest() {
+        assertNull(dmy.getYear());
+    }
+
+    @Test
+    void setYearTest() {
+        String year = GetRandomString();
+        dmy.setMonth(year);
+        assertEquals(year, dmy.getMonth());
+    }
+
+}

+ 1 - 1
src/test/java/scot/carricksoftware/grantswriter/writer/latex/LatexDocumentStartTest.java

@@ -43,7 +43,7 @@ class LatexDocumentStartTest {
         documentStart.write();
         documentStart.write();
 
 
         //noinspection SpellCheckingInspection
         //noinspection SpellCheckingInspection
-        inorder.verify(fileWriterMock).writeLine("\\documentclass[a4paper,11pt]{memoir}");
+        inorder.verify(fileWriterMock).writeLine("\\documentclass[a4paper,11pt, twoside]{memoir}");
         //noinspection SpellCheckingInspection
         //noinspection SpellCheckingInspection
         inorder.verify(latexPackageDeclarationMock).write("longtable");
         inorder.verify(latexPackageDeclarationMock).write("longtable");
         inorder.verify(fileWriterMock).writeLine("\\begin{document}");
         inorder.verify(fileWriterMock).writeLine("\\begin{document}");