File tree Expand file tree Collapse file tree
core-java-strings/src/test/java/com/ossez/multiline Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,3 +14,4 @@ This module contains articles about Java 11 core features
1414- [ Negate a Predicate Method Reference with Java 11] ( https://www.baeldung.com/java-negate-predicate-method-reference )
1515- [ Benchmark JDK Collections vs Eclipse Collections] ( https://www.baeldung.com/jdk-collections-vs-eclipse-collections )
1616- [ Pre-compile Regex Patterns Into Pattern Objects] ( https://www.baeldung.com/java-regex-pre-compile )
17+
Original file line number Diff line number Diff line change 22
33import org .junit .Test ;
44
5- import javax .swing .*;
65import java .io .IOException ;
76
87import static org .junit .Assert .assertEquals ;
98
109public class MultiLineStringUnitTest {
1110
12-
11+
1312 @ Test
1413 public void whenCompareMultiLineStrings_thenTheyAreAllTheSame () throws IOException {
1514 MultiLineString ms = new MultiLineString ();
1615 assertEquals (ms .stringConcatenation (), ms .stringJoin ());
1716 assertEquals (ms .stringJoin (), ms .stringBuilder ());
1817 assertEquals (ms .stringBuilder (), ms .guavaJoiner ());
1918 assertEquals (ms .guavaJoiner (), ms .loadFromFile ());
20- assertEquals (ms .loadFromFile (), ms .textBlocks ());
19+
20+ // Due to JDK version, we cannot test TestBlocks
21+ // assertEquals(ms.loadFromFile(), ms.textBlocks());
22+ }
23+ @ Test
24+ public void newlineInOS () throws IOException {
25+ System .out .println (System .lineSeparator ());
26+ System .out .println (System .getProperty ("line.separator" ));
2127 }
22-
2328}
Original file line number Diff line number Diff line change 1515 </parent >
1616
1717 <modules >
18+ <module >core-java</module >
1819 <module >core-java-8</module >
1920 <module >core-java-8-2</module >
2021 <module >core-java-11</module >
You can’t perform that action at this time.
0 commit comments