瀏覽代碼

AddCensusEntryTest (3)

Andrew Grant 2 月之前
父節點
當前提交
ff013ca5ea
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      src/test/java/scot/carricksoftware/grantswriter/data/helpers/AddCensusEntryTest.java

+ 9 - 0
src/test/java/scot/carricksoftware/grantswriter/data/helpers/AddCensusEntryTest.java

@@ -80,4 +80,13 @@ class AddCensusEntryTest {
 
         assertEquals("Recorded as being at " + place, timeLine.firstEntry().getValue().get(0));
     }
+
+    @Test
+    void OccupationTest() {
+        String occupation = GetRandomString();
+        when(censusEntryMock.getPersonalOccupation()).thenReturn(occupation);
+        addCensusEntry.add(timeLine, refs, censusEntryList);
+
+        assertEquals("Occupation recorded as " + occupation, timeLine.firstEntry().getValue().get(1));
+    }
 }