public void Divided_Text_In_Line_Is_Correct() { var textDivider = new TextDivider(); var result = textDivider.DivideText("þodis þodis þodis", 13); ReadStringLines(result, (line) => Assert.IsTrue(line.Count(c => !Char.IsWhiteSpace(c)) <= 13)); var result2 = textDivider.DivideText("ðiuolaikiðkas ir mano þodis", 7); ReadStringLines(result2, (line) => Assert.IsTrue(line.Count(c => !Char.IsWhiteSpace(c)) <= 7)); }
public void Divides_Text_To_Lines_Correctly() { var textDivider = new TextDivider(); var result = textDivider.DivideText("þodis þodis þodis", 13); Assert.AreEqual(2, Regex.Matches(result, "\n").Count); var result2 = textDivider.DivideText("ðiuolaikiðkas ir mano þodis", 7); Assert.AreEqual(4, Regex.Matches(result2, "\n").Count); }