Skip to content

Commit c848975

Browse files
ddamkeddamke
authored andcommitted
change format of project Notes
1 parent e18d5b1 commit c848975

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

src/main/java/de/doubleslash/keeptime/view/ProjectReport.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,8 @@ public int getNumberOfNotes() {
5555
return this.numberOfNotes;
5656
}
5757

58-
public String getNotes(final boolean addNumberOfNotes) {
59-
if (addNumberOfNotes) {
60-
return Integer.toString(this.numberOfNotes) + " Notes: " + this.sb.toString();
61-
} else {
62-
return this.sb.toString();
63-
}
58+
public String getNotes() {
59+
return this.sb.toString();
6460
}
6561

6662
}

src/main/java/de/doubleslash/keeptime/view/ReportController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ private Button createCopyProjectButton(final List<Work> projectWork) {
390390
}
391391
final Clipboard clipboard = Clipboard.getSystemClipboard();
392392
final ClipboardContent content = new ClipboardContent();
393-
content.putString(pr.getNotes(true));
393+
content.putString(pr.getNotes());
394394
clipboard.setContent(content);
395395
};
396396

src/test/java/de/doubleslash/keeptime/view/ProjectReportTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void testAppendToWorkNotes() {
4747
this.uut.appendToWorkNotes(EMPTY_NOTE);
4848
this.uut.appendToWorkNotes("note 2 ");
4949
final String expected = "note 1; note 2";
50-
assertEquals(expected, this.uut.getNotes(false));
50+
assertEquals(expected, this.uut.getNotes());
5151
}
5252

5353
@Test
@@ -56,7 +56,7 @@ public void testAppendToWorkNotesAddNumberOfNotes() {
5656
this.uut.appendToWorkNotes(EMPTY_NOTE);
5757
this.uut.appendToWorkNotes("note 2 ");
5858
final String expected = "3 Notes: note 1; note 2";
59-
assertEquals(expected, this.uut.getNotes(true));
59+
assertEquals(expected, this.uut.getNotes());
6060
}
6161

6262
@Test
@@ -66,7 +66,7 @@ public void testAppendToWorkNotesAddNumberOfNotes_2() {
6666
this.uut.appendToWorkNotes("note 2");
6767
this.uut.appendToWorkNotes("note 3");
6868
final String expected = "3 Notes: note 1; note 2; note 3";
69-
assertEquals(expected, this.uut.getNotes(true));
69+
assertEquals(expected, this.uut.getNotes());
7070
}
7171

7272
@Test
@@ -77,7 +77,7 @@ public void testAppendToWorkNotesAddNumberOfNotes_EmptyNotesAtTheEnd() {
7777
this.uut.appendToWorkNotes(EMPTY_NOTE);
7878
this.uut.appendToWorkNotes(EMPTY_NOTE);
7979
final String expected = "4 Notes: note 1; note 2";
80-
assertEquals(expected, this.uut.getNotes(true));
80+
assertEquals(expected, this.uut.getNotes());
8181
}
8282

8383
}

0 commit comments

Comments
 (0)