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