public void Split_OneNewLine_TwoElementTable() { var target = new NewLineSplitter(); var actual = target.Split("test1\r\ntest2"); CollectionAssert.AreEqual(new[] { "test1", "test2" }, actual); }
public void Split_NoNewLines_OneElementTable() { var target = new NewLineSplitter(); var actual = target.Split("test"); CollectionAssert.AreEqual(new[] { "test" }, actual); }
public string RewriteTest(string text) { ITextSplitter rowSplitter = new NewLineSplitter(); ITextSplitter columnSplitter = new TabSplitter(); ITextRewriter target = new TableRewriter(rowSplitter, columnSplitter); return(target.Rewrite(text)); }
public MainWindow() { InitializeComponent(); ITextSplitter columnSplitter = new NewLineSplitter(); ITextSplitter rowSplitter = new TabSplitter(); tableRewriter = new TableRewriter(columnSplitter, rowSplitter); }
public void Split_Null_NullReferenceException() { var target = new NewLineSplitter(); Assert.Throws <NullReferenceException>(() => target.Split(null)); }