讨论字符串的的文章
This commit is contained in:
parent
c816787e06
commit
b90cdd3306
@ -14,3 +14,4 @@ This module contains articles about Java 11 core features
|
|||||||
- [Negate a Predicate Method Reference with Java 11](https://www.baeldung.com/java-negate-predicate-method-reference)
|
- [Negate a Predicate Method Reference with Java 11](https://www.baeldung.com/java-negate-predicate-method-reference)
|
||||||
- [Benchmark JDK Collections vs Eclipse Collections](https://www.baeldung.com/jdk-collections-vs-eclipse-collections)
|
- [Benchmark JDK Collections vs Eclipse Collections](https://www.baeldung.com/jdk-collections-vs-eclipse-collections)
|
||||||
- [Pre-compile Regex Patterns Into Pattern Objects](https://www.baeldung.com/java-regex-pre-compile)
|
- [Pre-compile Regex Patterns Into Pattern Objects](https://www.baeldung.com/java-regex-pre-compile)
|
||||||
|
|
||||||
|
@ -2,14 +2,13 @@ package com.ossez.multiline;
|
|||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import javax.swing.*;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
public class MultiLineStringUnitTest {
|
public class MultiLineStringUnitTest {
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenCompareMultiLineStrings_thenTheyAreAllTheSame() throws IOException {
|
public void whenCompareMultiLineStrings_thenTheyAreAllTheSame() throws IOException {
|
||||||
MultiLineString ms = new MultiLineString();
|
MultiLineString ms = new MultiLineString();
|
||||||
@ -17,7 +16,13 @@ public class MultiLineStringUnitTest {
|
|||||||
assertEquals(ms.stringJoin(), ms.stringBuilder());
|
assertEquals(ms.stringJoin(), ms.stringBuilder());
|
||||||
assertEquals(ms.stringBuilder(), ms.guavaJoiner());
|
assertEquals(ms.stringBuilder(), ms.guavaJoiner());
|
||||||
assertEquals(ms.guavaJoiner(), ms.loadFromFile());
|
assertEquals(ms.guavaJoiner(), ms.loadFromFile());
|
||||||
assertEquals(ms.loadFromFile(), ms.textBlocks());
|
|
||||||
|
// Due to JDK version, we cannot test TestBlocks
|
||||||
|
// assertEquals(ms.loadFromFile(), ms.textBlocks());
|
||||||
|
}
|
||||||
|
@Test
|
||||||
|
public void newlineInOS() throws IOException {
|
||||||
|
System.out.println(System.lineSeparator());
|
||||||
|
System.out.println(System.getProperty("line.separator"));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
<module>core-java</module>
|
||||||
<module>core-java-8</module>
|
<module>core-java-8</module>
|
||||||
<module>core-java-8-2</module>
|
<module>core-java-8-2</module>
|
||||||
<module>core-java-11</module>
|
<module>core-java-11</module>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user