Пример #1
0
 public void WrapWords_WhenPassedEmptyString_ShouldReturnEmptyString()
 {
     Assert.AreEqual(string.Empty, WordWrapper.WrapWords(string.Empty, 1));
 }
Пример #2
0
 public void WrapWords_WhenPassedComplexString_ShouldReturnStringCorrectlyTwo()
 {
     Assert.AreEqual("WordWord\nWord\nWordWord\nWord", WordWrapper.WrapWords("WordWordWord WordWord Word", 8));
 }
Пример #3
0
 public void WrapWords_WhenPassedStringWithSpacesAfterRowLength_ShouldReturnStringSplitAtSpaces()
 {
     Assert.AreEqual("Word\nWord", WordWrapper.WrapWords("Word Word", 4));
 }
Пример #4
0
 public void WrapWords_WhenPassedRowLengthLessThanOne_ShouldReturnInputString()
 {
     Assert.AreEqual("Word", WordWrapper.WrapWords("Word", 0));
 }
Пример #5
0
 public void WrapWords_WhenPassedLongerStringWithNoSpacesGreaterThanRowLength_ShouldReturnStringSplitAtRowLength()
 {
     Assert.AreEqual("WordW\nordWo\nrd", WordWrapper.WrapWords("WordWordWord", 5));
 }
Пример #6
0
 public void WrapWords_WhenPassedStringEqualToRowLength_ShouldReturnInputString()
 {
     Assert.AreEqual("Word", WordWrapper.WrapWords("Word", 4));
 }