public void TestReplacementOfAnd() { string sTestString = "Adam & Eve"; string sExpectedString = "Adam and Eve"; Assert.That(StringFilter.GetFilteredString(sTestString), Is.EqualTo(sExpectedString)); }
public void TestReplacementOfMultipleAnd() { string sTestString = "Going on & on & on"; string sExpectedString = "Going on and on and on"; Assert.That(StringFilter.GetFilteredString(sTestString), Is.EqualTo(sExpectedString)); }
public void TestThatGetFilteredStringReplacesMultipleConsecutiveUnderscoresWithASingleSpace() { string sTestSting = "I__use__underscore__instead____of_________spaces"; string sExpectedString = "I use underscore instead of spaces"; Assert.That(StringFilter.GetFilteredString(sTestSting), Is.EqualTo(sExpectedString)); }
public void TestThatGetFilteredStringRemovesLeadingAndTrailingUnderscores() { string sTestSting = "_I use underscore instead of spaces __ "; string sExpectedString = "I use underscore instead of spaces"; Assert.That(StringFilter.GetFilteredString(sTestSting), Is.EqualTo(sExpectedString)); }
public void TestThatMultipleHtmlNbspAreRemoved() { string sTestString = " "; string sExpectedString = ""; Assert.That(StringFilter.GetFilteredString(sTestString), Is.EqualTo(sExpectedString)); }
public void TestThatGetFilteredStringReplacesUnderscoreWithSpace() { string sTestSting = "I_use_underscore_instead_of_spaces"; string sExpectedString = "I use underscore instead of spaces"; Assert.That(StringFilter.GetFilteredString(sTestSting), Is.EqualTo(sExpectedString)); }
public void TestThatGetFilteredStringReducesConsecutiveSpacesToASingleSpace() { string sTestString = "Jane Doe"; string sExpectedString = "Jane Doe"; Assert.That(StringFilter.GetFilteredString(sTestString), Is.EqualTo(sExpectedString)); }
public void TestThatGetFilteredStringCanHandleAnEmptyString() { string sTestString = ""; string sExpectedString = sTestString; Assert.That(StringFilter.GetFilteredString(sTestString), Is.EqualTo(sExpectedString)); }
public void TestThatGetFilteredStringRemovesLeadingAndTrailingSpaces() { string sTestString = " John Doe "; string sExpectedString = "John Doe"; Assert.That(StringFilter.GetFilteredString(sTestString), Is.EqualTo(sExpectedString)); }
public void TestThatGetFilteredStringRemovesIllegalCharacters() { string sTestString = "`~!@#$%^&*()_=+[{]}\\|;:\",<.>/?\a\b\t\r\v\f\n\u001B3`~!@#$%^&*()_=+[{]}\\|;:\",<.>/?\a\b\t\r\v\f\n\u001BM`~!@#$%^&*()_=+[{]}\\|;:\",<.>/?\a\b\t\r\v\f\n\u001B"; string sExpectedString = "3 M"; Assert.That(StringFilter.GetFilteredString(sTestString), Is.EqualTo(sExpectedString)); }
public void TestThatGetFilteredStringAllowsApostrophesInNames() { string sTestString = "O'Malley"; string sExpectedString = sTestString; Assert.That(StringFilter.GetFilteredString(sTestString), Is.EqualTo(sExpectedString)); }
public void TestThatGetFilteredStringAllowsHyphensInNames() { string sTestString = "Double-Barrel"; string sExpectedString = sTestString; Assert.That(StringFilter.GetFilteredString(sTestString), Is.EqualTo(sExpectedString)); }
public void TestThatGetFilteredStringAllowsSpacesInNames() { string sTestString = "A space"; string sExpectedString = sTestString; Assert.That(StringFilter.GetFilteredString(sTestString), Is.EqualTo(sExpectedString)); }