public void ShouldTrimLeadingAndTrailingSpaces() { var formatter = new StatisticNameFormatter(); var actual = formatter.Format(" the-quick "); Assert.AreEqual("nitriq-the-quick", actual); }
public void ShouldTrimLeadingAndNonAlphaCharacters() { var formatter = new StatisticNameFormatter(); var actual = formatter.Format("(the-quick)"); Assert.AreEqual("nitriq-the-quick", actual); }
public void ShouldReplaceWhitespaceWithDash() { var formatter = new StatisticNameFormatter(); var actual = formatter.Format("the quick brown fox"); Assert.AreEqual("nitriq-the-quick-brown-fox", actual); }
public void ShouldReplaceMultipleDashesWithSingle() { var formatter = new StatisticNameFormatter(); var actual = formatter.Format("the--quick"); Assert.AreEqual("nitriq-the-quick", actual); }
public void ShouldConvertTextToLowercase() { var formatter = new StatisticNameFormatter(); var actual = formatter.Format("AbC"); Assert.AreEqual("nitriq-abc", actual); }
public void ShouldAppendNitriqToFrontOfName() { var formatter = new StatisticNameFormatter(); var actual = formatter.Format("The Quick"); Assert.AreEqual("nitriq-the-quick", actual); }