Exemple #1
0
        public void Split_OneTab_TwoElementTable()
        {
            var target = new TabSplitter();
            var actual = target.Split("test1\ttest2");

            CollectionAssert.AreEqual(new[] { "test1", "test2" }, actual);
        }
Exemple #2
0
        public void Split_NoTabs_OneElementTable()
        {
            var target = new TabSplitter();
            var actual = target.Split("test");

            CollectionAssert.AreEqual(new[] { "test" }, actual);
        }
Exemple #3
0
        public string RewriteTest(string text)
        {
            ITextSplitter rowSplitter    = new NewLineSplitter();
            ITextSplitter columnSplitter = new TabSplitter();
            ITextRewriter target         = new TableRewriter(rowSplitter, columnSplitter);

            return(target.Rewrite(text));
        }
Exemple #4
0
        public MainWindow()
        {
            InitializeComponent();

            ITextSplitter columnSplitter = new NewLineSplitter();
            ITextSplitter rowSplitter    = new TabSplitter();

            tableRewriter = new TableRewriter(columnSplitter, rowSplitter);
        }
Exemple #5
0
        public void Split_Null_NullReferenceException()
        {
            var target = new TabSplitter();

            Assert.Throws <NullReferenceException>(() => target.Split(null));
        }