public void lines_containing_embedded_line_breaks_are_trimmed_when_trim_is_true() { var lines = new[] { " hello \n world ", " another line " }; var expected = new[] { "hello", "world", "another line" }; var t = new TestElement(lines); Assert.AreEqual(String.Join("\r\n", expected), t.GetTextLines(trim: true)); }
public void lines_are_trimmed_when_trim_is_true() { var lines = new[] { " hello ", " world " }; var expected = new[] { "hello", "world" }; var t = new TestElement(lines); Assert.AreEqual(String.Join("\r\n", expected), t.GetTextLines(trim: true)); }
public void lines_are_not_flattened_when_flatten_is_false() { var lines = new[] { " hello ", " world " }; var expected = new[] { " hello ", " world " }; var t = new TestElement(lines); Assert.AreEqual(String.Join("\r\n", expected), t.GetTextLines(flatten: false)); }
public void embedded_empty_lines_are_removed_when_trim_is_true() { var lines = new[] { " \n \n \r\n hello \n world ", " \r\n another line " }; var expected = new[] { "hello", "world", "another line" }; var t = new TestElement(lines); Assert.AreEqual(String.Join("\r\n", expected), t.GetTextLines(trim: true)); }
public void lines_containing_embedded_line_breaks_are_not_trimmed_when_trim_is_false() { var lines = new[] { " hello\nworld ", " world " }; var expected = new[] { " hello", "world ", " world " }; var t = new TestElement(lines); const string join = "!!#!#!!"; Assert.AreEqual(String.Join(join, expected), t.GetTextLines(flatten: true, join: join)); }
public void lines_are_flattened_when_flatten_is_true() { var lines = new[] { " hello ", " world " }; var expected = new[] { " hello ", " world " }; var t = new TestElement(lines); const string join = "!!#!#!!"; Assert.AreEqual(String.Join(join, expected), t.GetTextLines(flatten: true, join: join)); }