Exemplo n.º 1
0
        public void ShouldChangeDotSymbolsToHyphans() {
            DefaultSlugService slugService = new DefaultSlugService(new Mock<ISlugEventHandler>().Object);

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

            Assert.That(slugService.Slugify("a-%-.d"), Is.EqualTo("a-d"));
        }
Exemplo n.º 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"));
        }