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); }
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); }
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); }
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); }