32
32
*/
33
33
public final class LineRecorderTest {
34
34
35
- private static final String RECORD1_PART1 = "a1\n " ;
36
- private static final String RECORD1_PART2 = "a2\n " ;
35
+ private static final String RECORD1_PART1 = "a1" ;
36
+ private static final String RECORD1_PART2 = "a2" ;
37
37
private static final String RECORD1_ENDMARKER = "\n " ;
38
38
39
- private static final String RECORD2_PART1 = "b1\n " ;
40
- private static final String RECORD2_PART2 = "b2\n " ;
39
+ private static final String RECORD2_PART1 = "b1" ;
40
+ private static final String RECORD2_PART2 = "b2" ;
41
41
private static final String RECORD2_ENDMARKER = "\n " ;
42
42
43
- private static final String RECORD3_PART1 = "c1\n " ;
44
- private static final String RECORD3_PART2 = "c2\n " ;
43
+ private static final String RECORD3_PART1 = "c1" ;
44
+ private static final String RECORD3_PART2 = "c2" ;
45
45
private static final String RECORD3_ENDMARKER = "EOR" ;
46
46
47
+ private static final String LINE_SEPARATOR = "\n " ;
48
+
47
49
private LineRecorder lineRecorder ;
48
50
49
51
@ Mock
@@ -63,13 +65,21 @@ public void shouldEmitRecords() {
63
65
lineRecorder .process (RECORD1_ENDMARKER );
64
66
65
67
final InOrder ordered = inOrder (receiver );
66
- ordered .verify (receiver ).process (RECORD1_PART1 + RECORD1_PART2 );
68
+ ordered .verify (receiver ).process (
69
+ RECORD1_PART1 +
70
+ LINE_SEPARATOR +
71
+ RECORD1_PART2 +
72
+ LINE_SEPARATOR );
67
73
68
74
lineRecorder .process (RECORD2_PART1 );
69
75
lineRecorder .process (RECORD2_PART2 );
70
76
lineRecorder .process (RECORD2_ENDMARKER );
71
77
72
- ordered .verify (receiver ).process (RECORD2_PART1 + RECORD2_PART2 );
78
+ ordered .verify (receiver ).process (
79
+ RECORD2_PART1 +
80
+ LINE_SEPARATOR +
81
+ RECORD2_PART2 +
82
+ LINE_SEPARATOR );
73
83
ordered .verifyNoMoreInteractions ();
74
84
}
75
85
@@ -81,7 +91,11 @@ public void shouldEmitRecordWithNonDefaultRecordMarker() {
81
91
lineRecorder .process (RECORD3_ENDMARKER );
82
92
83
93
final InOrder ordered = inOrder (receiver );
84
- ordered .verify (receiver ).process (RECORD3_PART1 + RECORD3_PART2 );
94
+ ordered .verify (receiver ).process (
95
+ RECORD3_PART1 +
96
+ LINE_SEPARATOR +
97
+ RECORD3_PART2 +
98
+ LINE_SEPARATOR );
85
99
ordered .verifyNoMoreInteractions ();
86
100
}
87
101
0 commit comments