public void TruncateAtWordShouldReturnTheSameInputWhenItsLengthIsShorterThanTheTruncateLength() { var service = new StringService(); var input = "Test Input"; Assert.Equal(input, service.TruncateAtWord(input, input.Length + 1)); }
public void TruncateAtWordShouldReturnNullWithNullInput() { var service = new StringService(); Assert.Null(service.TruncateAtWord(null, 30)); }
public void TruncateAtWordShouldWorkCorrectly(string input, int length, string expected) { var service = new StringService(); Assert.Equal(expected, service.TruncateAtWord(input, length)); }