public void test_process_marked_lines_2()
        {
            // no splitter => no markers
            var markers = "tmm".ToCharArray();
            var lines   = new[] { "1", "2", "3" };

            Quotations.ProcessMarkedLines(lines, markers).Lines.ShouldBe(lines);
        }
        public void test_process_marked_lines_3()
        {
            // text after splitter without markers is quotation
            var markers = "tst".ToCharArray();
            var lines   = new[] { "1", "2", "3" };

            Quotations.ProcessMarkedLines(lines, markers).Lines.ShouldBe(new[] { "1" });
        }
        public void test_process_marked_lines_5()
        {
            // message + <quotation without markers> + nested quotation
            var markers = "tstsmt".ToCharArray();
            var lines   = new[] { "1", "2", "3", "4", "5", "6" };

            Quotations.ProcessMarkedLines(lines, markers).Lines.ShouldBe(new[] { "1" });
        }
        public void test_process_marked_lines_4()
        {
            // message + quotation + signature
            var markers = "tsmt".ToCharArray();
            var lines   = new[] { "1", "2", "3", "4" };

            Quotations.ProcessMarkedLines(lines, markers).Lines.ShouldBe(new[] { "1", "4" });
        }
        public void test_process_marked_lines_1()
        {
            // quotations and last message lines are mixed
            // consider all to be a last message
            var markers = "tsemmtetm".ToCharArray();
            var lines   = Enumerable.Range(1, markers.Length).Select(i => i.ToString()).ToArray();

            Quotations.ProcessMarkedLines(lines, markers).Lines.ShouldBe(lines);
        }
        public void test_process_marked_lines_10()
        {
            // inline reply with link wrapped in paranthesis
            var markers = "tsmtm".ToCharArray();
            var lines   = new[] { "text",
                                  "splitter",
                                  ">",
                                  "inline  reply (http://example.com)",
                                  ">" };

            Quotations.ProcessMarkedLines(lines, markers).Lines.ShouldBe(lines);
        }
        public void test_process_marked_lines_7()
        {
            // link starts on the new line
            var markers = "tmmmtm".ToCharArray();
            var lines   = new[] { "text",
                                  ">",
                                  ">",
                                  ">",
                                  "(http://example.com) >  ",
                                  "> life is short. (http://example.com)  " };

            Quotations.ProcessMarkedLines(lines, markers).Lines.ShouldBe(lines.Take(1));
        }
        public void test_process_marked_lines_8()
        {
            // check all "inline" replies
            var markers = "tsmtmtm".ToCharArray();
            var lines   = new[] { "text",
                                  "splitter",
                                  ">",
                                  "(http://example.com)",
                                  ">",
                                  "inline  reply",
                                  ">" };

            Quotations.ProcessMarkedLines(lines, markers).Lines.ShouldBe(lines);
        }
        public void test_process_marked_lines_6()
        {
            // test links wrapped with paranthesis
            // link starts on the marker line
            var markers = "tsmttem".ToCharArray();
            var lines   = new[] { "text",
                                  "splitter",
                                  ">View (http://example.com",
                                  "/abc",
                                  ")",
                                  "",
                                  "> quote" };

            Quotations.ProcessMarkedLines(lines, markers).Lines.ShouldBe(lines.Take(1));
        }