Exemple #1
0
        public void PostTitleRemovesBadCharacters()
        {
            PostBLL postBLL = new PostBLL();

            string inputPostTitle = "And we're live! Kicking off with the gas all the way down!";

            string sut = postBLL.UrlTitleWithDashes(inputPostTitle);
            sut = postBLL.SanitizedUrlTitle(sut);

            string result = "And-were-live-Kicking-off-with-the-gas-all-the-way-down";

            Assert.That(sut, Is.EqualTo(result));
        }
Exemple #2
0
        public void PostTitleAddedDashes()
        {
            PostBLL postBLL = new PostBLL();

            string inputPostTitle = "And we're live! Kicking off with the gas all the way down!";

            string sut = postBLL.UrlTitleWithDashes(inputPostTitle);

            string result = "And-we're-live!-Kicking-off-with-the-gas-all-the-way-down!";

            Console.WriteLine(sut);

            Assert.That(sut, Is.EqualTo(result));
        }