public void StripFirstAndLastCharacterWorksLikeACharm() { string actual = StringUtils.StripFirstAndLastCharacter("There are 17 steps to winding up a bird chronicle correctly"); Assert.IsNotNull(actual); Assert.AreEqual("here are 17 steps to winding up a bird chronicle correctl", actual); }
public void StripFirstAndLastCharacterWithEmptyString() { string actual = StringUtils.StripFirstAndLastCharacter(String.Empty); Assert.IsNotNull(actual, "StringUtils.StripFirstAndLastCharacter(String.Empty) should return String.Empty."); Assert.AreEqual(String.Empty, actual, "StringUtils.StripFirstAndLastCharacter(String.Empty) should return String.Empty."); }
public void StripFirstAndLastCharacterWithReallyShortStrings() { string actual = StringUtils.StripFirstAndLastCharacter("B"); Assert.IsNotNull(actual, "StringUtils.StripFirstAndLastCharacter(\"B\") should return String.Empty."); Assert.AreEqual(String.Empty, actual, "StringUtils.StripFirstAndLastCharacter(\"B\") should return String.Empty."); actual = StringUtils.StripFirstAndLastCharacter("BF"); Assert.IsNotNull(actual, "StringUtils.StripFirstAndLastCharacter(\"BF\") should return String.Empty."); Assert.AreEqual(String.Empty, actual, "StringUtils.StripFirstAndLastCharacter(\"BF\") should return String.Empty."); }