refactoring code snippets

This commit is contained in:
unknown
2021-02-20 21:11:20 +05:30
parent fd9f3de671
commit 5995659fa4

View File

@@ -4,7 +4,6 @@ import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class SplitStringByNewLineUnitTest {
@Test
public void givenString_whenSplitByNewLineUsingRegularExpressionPattern_thenReturnsArray() {
assertThat("Line1\nLine2\nLine3".split("\\r?\\n|\\r")).containsExactly("Line1", "Line2", "Line3");
@@ -22,6 +21,4 @@ public class SplitStringByNewLineUnitTest {
assertThat("Line1\r\nLine2\r\nLine3".split("\\R")).containsExactly("Line1", "Line2", "Line3");
}
}