public void CanBuildValidUrlWithInvalidCharsBetweenSpaces() { var title = "Too ^&* many ;'\"[]\\_+= invalidChars"; var url = UrlSeoUtils.BuildValidUrl(title); var expected = "too-many-invalidchars"; Assert.AreEqual(expected, url); }
public void CanBuildValidUrlWithSequentialDashes() { var title = "Too---many---dashes"; var url = UrlSeoUtils.BuildValidUrl(title); var expected = "too-many-dashes"; Assert.AreEqual(expected, url); }
public void CanBuildValidUrlWithOutAnyInvalidChars() { var title = "This is a post about optimizing a title"; var url = UrlSeoUtils.BuildValidUrl(title); var expected = "this-is-a-post-about-optimizing-a-title"; Assert.AreEqual(expected, url); }
public void CanBuildValidUrlWithInvalidChars() { var title = "Really~1@# Bad-*7s;:Title"; var url = UrlSeoUtils.BuildValidUrl(title); var expected = "really1-bad-7stitle"; Assert.AreEqual(expected, url); }
public void CanBuildValidUrlWithSequentialSpaces() { string title = "Too many spaces"; string url = UrlSeoUtils.BuildValidUrl(title); string expected = "too-many-spaces"; Assert.AreEqual(expected, url); }