讨论字符串的的文章
This commit is contained in:
+9
-4
@@ -2,14 +2,13 @@ package com.ossez.multiline;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class MultiLineStringUnitTest {
|
||||
|
||||
|
||||
|
||||
@Test
|
||||
public void whenCompareMultiLineStrings_thenTheyAreAllTheSame() throws IOException {
|
||||
MultiLineString ms = new MultiLineString();
|
||||
@@ -17,7 +16,13 @@ public class MultiLineStringUnitTest {
|
||||
assertEquals(ms.stringJoin(), ms.stringBuilder());
|
||||
assertEquals(ms.stringBuilder(), ms.guavaJoiner());
|
||||
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"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user