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