Esempio n. 1
0
        public void BreakOnSpacesAndDashes()
        {
            string text     = "Four score, and seven-years";
            string expected = "Four score, *and seven- *years";
            string actual   = Break.Lines(text, 12);

            Assert.AreEqual(expected.Replace("*", Environment.NewLine), actual);
        }
Esempio n. 2
0
        public void VeryLongWord()
        {
            string text     = "Four score AndSevenYearsAgoOur fathers";
            string expected = "Four score *AndSevenYearsAgoOur *fathers";
            string actual   = Break.Lines(text, 14);

            Assert.AreEqual(expected.Replace("*", Environment.NewLine), actual);
        }
Esempio n. 3
0
        public void LineStarts()
        {
            string text     = "Four score    and seven     - years ago our fathers";
            string expected = "Four score    *and seven     - *years ago *our fathers";
            string actual   = Break.Lines(text, 12);

            Assert.AreEqual(expected.Replace("*", Environment.NewLine), actual);
        }
Esempio n. 4
0
        public void ShortLines()
        {
            string text     = "Four score and\nseven years\rago our\r\nfathers";
            string expected = "Four score and *seven years *ago our *fathers";
            string actual   = Break.Lines(text, 80);

            Assert.AreEqual(expected.Replace("*", Environment.NewLine), actual);
        }