2929
3030/**
3131 * @author Michael J. Simons
32+ * @author Kevin Wittek
3233 * @soundtrack Fatoni & Dexter - Yo, Picasso
3334 */
3435class ResultSummariesTest {
3536
37+ private static final String LINE_SEPARATOR = System .lineSeparator ();
38+
3639 private static Stream <Arguments > params () {
3740 return Stream .of (
3841 Arguments .of ("match (n) - [r:FOO*] -> (m) RETURN r" , 1 , 19 , ""
39- + "\t match (n) - [r:FOO*] -> (m) RETURN r\n "
40- + "\t ^\n " ),
42+ + "\t match (n) - [r:FOO*] -> (m) RETURN r" + LINE_SEPARATOR
43+ + "\t ^" + LINE_SEPARATOR ),
4144 Arguments .of ("match (n)\n - [r:FOO*] -> (m) RETURN r" , 2 , 1 , ""
42- + "\t match (n)\n "
43- + "\t - [r:FOO*] -> (m) RETURN r\n "
44- + "\t ^\n " ),
45+ + "\t match (n)" + LINE_SEPARATOR
46+ + "\t - [r:FOO*] -> (m) RETURN r" + LINE_SEPARATOR
47+ + "\t ^" + LINE_SEPARATOR ),
4548 Arguments .of ("match (x0123456789) \n with x0123456789\n match(n) - [r:FOO*] -> (m) RETURN r" , 3 , 10 , ""
46- + "\t match (x0123456789) \n "
47- + "\t with x0123456789\n "
48- + "\t match(n) - [r:FOO*] -> (m) RETURN r\n "
49- + "\t ^\n " ),
49+ + "\t match (x0123456789) " + LINE_SEPARATOR
50+ + "\t with x0123456789" + LINE_SEPARATOR
51+ + "\t match(n) - [r:FOO*] -> (m) RETURN r" + LINE_SEPARATOR
52+ + "\t ^" + LINE_SEPARATOR ),
5053 Arguments .of ("match (n) \n - [r:FOO*] -> (m) \n RETURN r" , 2 , 1 , ""
51- + "\t match (n) \n "
52- + "\t - [r:FOO*] -> (m) \n "
53- + "\t ^\n "
54- + "\t RETURN r\n " )
54+ + "\t match (n) " + LINE_SEPARATOR
55+ + "\t - [r:FOO*] -> (m) " + LINE_SEPARATOR
56+ + "\t ^" + LINE_SEPARATOR
57+ + "\t RETURN r" + LINE_SEPARATOR )
5558 );
5659 }
5760
@@ -71,7 +74,7 @@ void shouldFormatNotifications(String query, int line, int column, String expect
7174 when (notification .position ()).thenReturn (inputPosition );
7275
7376 String formattedNotification = ResultSummaries .format (notification , query );
74- assertThat (formattedNotification ).isEqualTo ("KGQ.Warning: Das ist keine gute Query.\n "
77+ assertThat (formattedNotification ).isEqualTo ("KGQ.Warning: Das ist keine gute Query." + LINE_SEPARATOR
7578 + expected
7679 + "Das solltest Du besser nicht mehr machen." );
7780 }
0 commit comments