Andrew Grant 3 mesiacov pred
rodič
commit
0318dbf060

+ 1 - 1
src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/PersonSubSectionTimeLineWriter.java

@@ -8,5 +8,5 @@ package scot.carricksoftware.grantswriter.writer.latex.parts.people.subsections;
 import scot.carricksoftware.grantswriter.domains.people.Person;
 
 public interface PersonSubSectionTimeLineWriter {
-    void write(Person person);
+    void write(@SuppressWarnings("unused") Person person);
 }

+ 2 - 0
src/main/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/WriteTimeLineImpl.java

@@ -64,4 +64,6 @@ public class WriteTimeLineImpl implements WriteTimeLine {
             }
         }
     }
+
+
 }

+ 7 - 3
src/test/java/scot/carricksoftware/grantswriter/writer/latex/parts/people/subsections/helpers/WriteTimeLineTest.java

@@ -8,6 +8,7 @@ package scot.carricksoftware.grantswriter.writer.latex.parts.people.subsections.
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.InOrder;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
 import scot.carricksoftware.grantswriter.data.TimeLineData;
@@ -15,7 +16,7 @@ import scot.carricksoftware.grantswriter.writer.FileWriter;
 import scot.carricksoftware.grantswriter.writer.latex.LatexLongTabLeEnd;
 import scot.carricksoftware.grantswriter.writer.latex.LatexLongTableStart;
 
-import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.mockito.Mockito.inOrder;
 
 
 @ExtendWith(MockitoExtension.class)
@@ -45,8 +46,11 @@ class WriteTimeLineTest {
     }
 
     @Test
-    void ConstructorTest() {
-        assertNotNull(writeTimeLine);
+    void writeTest() {
+        writeTimeLine.write();
+        InOrder inOrder = inOrder(latexLongTableStartMock, latexLongTabLeEndMock);
+        inOrder.verify(latexLongTableStartMock).write("l l");
+        inOrder.verify(latexLongTabLeEndMock).write();
     }