예제 #1
0
        public void ShouldChangeDotSymbolsToHyphans() {
            DefaultSlugService slugService = new DefaultSlugService(new Mock<ISlugEventHandler>().Object);

            Assert.That(slugService.Slugify("a,d"), Is.EqualTo("a-d"));
        }
예제 #2
0
        public void ShouldMakeSureFunkycharactersAndHyphansOnlyReturnSingleHyphan() {
            DefaultSlugService slugService = new DefaultSlugService(new Mock<ISlugEventHandler>().Object);

            Assert.That(slugService.Slugify("a-%-.d"), Is.EqualTo("a-d"));
        }
예제 #3
0
        public void ShouldStripContiguousDashesEverywhere() {
            DefaultSlugService slugService = new DefaultSlugService(new Mock<ISlugEventHandler>().Object);

            Assert.That(slugService.Slugify("a  -  b - c -- d"), Is.EqualTo("a-b-c-d"));
        }