public void CanSplitSingleLongWord() { string longWord = "abcdefghijklmnopqrstuvwxyz"; string splitWord = TextSplitter.SplitWord(longWord, 5, " "); Assert.AreEqual("abcde fghij klmno pqrst uvwxy z", splitWord); }
public void DoesNotSplitSingleShortWord() { string longWord = "abcdefghijklmn"; string splitWord = TextSplitter.SplitWord(longWord, 15, " "); Assert.AreEqual("abcdefghijklmn", splitWord); longWord = null; splitWord = TextSplitter.SplitWord(longWord, 15, " "); Assert.IsNull(splitWord); longWord = string.Empty; splitWord = TextSplitter.SplitWord(longWord, 15, " "); Assert.AreEqual(string.Empty, splitWord); }