public void InvalidCharactersLanguage2Test() { try { ObjectFactory.Current.Register(typeof(EnglishWords)); var nf = new NameFormatter(); var tn = nf.GetTableName("Test#?", WordsExtraction.FromDictionary, EnglishNameFormat); Assert.AreEqual("Test__", tn.ClassName); } finally { ObjectFactory.Current.Unregister(typeof(EnglishWords)); } }
public void GetWordsTest_MyColumnName() { try { ObjectFactory.Current.Register(typeof(EnglishWords)); var nf = new NameFormatter(); ColumnName cn = nf.GetColumnName("MY_COLUMN_NAME_", WordsExtraction.FromDictionary, EnglishNameFormat); Assert.AreEqual("MyColumnName", cn.PropertyName); cn = nf.GetColumnName("MY_COLUMN_NAME_", WordsExtraction.FromDictionary, EnglishNameFormatCamelCase); Assert.AreEqual("myColumnName", cn.PropertyName); } finally { ObjectFactory.Current.Unregister(typeof(EnglishWords)); } }
public void InvalidCharactersLanguageTest() { var nf = new NameFormatter(); var tn = nf.GetTableName("A#?", WordsExtraction.FromDictionary, InvariantNameFormat); Assert.AreEqual("A__", tn.ClassName); }
public void GetWordsTest_MyTableName2() { try { ObjectFactory.Current.Register(typeof(EnglishWords)); var nf = new NameFormatter(); var tn = nf.GetTableName("_MY_TABLE__NAME", WordsExtraction.FromDictionary, EnglishNameFormat); Assert.AreEqual("MyTableName", tn.ClassName); } finally { ObjectFactory.Current.Unregister(typeof(EnglishWords)); } }