فهرست منبع

Notes added to census entry command

Andrew Grant 7 ماه پیش
والد
کامیت
f0dedc18c3

+ 4 - 0
src/main/java/scot/carricksoftware/grants/commands/census/CensusEntryCommand.java

@@ -66,4 +66,8 @@ public interface CensusEntryCommand {
     String getPersonalOccupation();
 
     void setPersonalOccupation(String personalOccupation);
+
+    String getNotes();
+
+    void setNotes(String notes);
 }

+ 12 - 0
src/main/java/scot/carricksoftware/grants/commands/census/CensusEntryCommandImpl.java

@@ -39,6 +39,8 @@ public class CensusEntryCommandImpl implements CensusEntryCommand {
 
     private String personalOccupation;
 
+    private String notes;
+
 
     public Long getId() {
         return id;
@@ -177,4 +179,14 @@ public class CensusEntryCommandImpl implements CensusEntryCommand {
     public void setPersonalOccupation(String personalOccupation) {
         this.personalOccupation = personalOccupation;
     }
+
+    @Override
+    public String getNotes() {
+        return notes;
+    }
+
+    @Override
+    public void setNotes(String notes) {
+        this.notes = notes;
+    }
 }

+ 13 - 0
src/test/java/scot/carricksoftware/grants/commands/census/CensusEntryCommandTest.java

@@ -130,5 +130,18 @@ class CensusEntryCommandTest {
         command.setPersonalOccupation(personalOccupation);
         assertEquals(personalOccupation, command.getPersonalOccupation());
     }
+    @Test
+    void getNotesTest() {
+        assertNull(command.getNotes());
+    }
+
+    @Test
+    void setNotesTest() {
+        String notes = GetRandomString();
+        command.setNotes(notes);
+        assertEquals(notes, command.getNotes());
+    }
+
+
 
 }