private static INamingConvention GetNamingConvention(NamingConvention namingConvention) { INamingConvention target; switch (namingConvention) { case NamingConvention.Camel: target = new CamelCaseNamingConvention(); break; case NamingConvention.Hyphenated: target = new HyphenatedNamingConvention(); break; case NamingConvention.Pascal: target = new PascalCaseNamingConvention(); break; case NamingConvention.Underscored: target = new UnderscoredNamingConvention(); break; case NamingConvention.Null: target = new NullNamingConvention(); break; default: throw new NotImplementedException(namingConvention.ToString()); } return(target); }
public void TestHyphenated(string expected, string input) { var sut = new HyphenatedNamingConvention(); Assert.Equal(expected, sut.Apply(input)); }