|
|
|
@ -53,7 +53,14 @@ class SolutionTest {
|
|
|
|
|
System.out.println( String.format( "Solution took %01d.%03d secs", duration / 1000, duration % 1000 ));
|
|
|
|
|
|
|
|
|
|
try (BufferedReader chk = new BufferedReader( new InputStreamReader( new ByteArrayInputStream( bos.toByteArray() )))) {
|
|
|
|
|
assertEquals( expected, chk.readLine() );
|
|
|
|
|
String[] expectedLines = expected.split( "\\s*[|]\\s*" );
|
|
|
|
|
|
|
|
|
|
int lineCount = 0;
|
|
|
|
|
String line;
|
|
|
|
|
for ( ; (line = chk.readLine()) != null; lineCount++ ) {
|
|
|
|
|
assertEquals( expectedLines[ lineCount ], line );
|
|
|
|
|
}
|
|
|
|
|
assertEquals( expectedLines.length, lineCount );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
finally {
|
|
|
|
|