public void Convert() { var xmlPath = @"E:\Ahoo\SmartCode\src\SmartCode\DbTypeConverter\DbTypeMap.xml"; var patamters = new Dictionary <string, object> { { "XmlPath", xmlPath } }; IDbTypeConverter convert = new DefaultDbTypeConverter(NullLogger <DefaultDbTypeConverter> .Instance); convert.Initialize(patamters); var langType = convert.LanguageType(DbProvider.SqlServer, "CSharp", "int"); Assert.Equal("Int16", langType); }
public void Convert() { var logger = SmartSql.Logging.NoneLoggerFactory.Instance.CreateLogger <DefaultDbTypeConverter>(); var xmlPath = @"E:\Ahoo\SmartCode\src\SmartCode\DbTypeConverter\DbTypeMap.xml"; var patamters = new Dictionary <string, string> { { "XmlPath", xmlPath } }; IDbTypeConverter convert = new DefaultDbTypeConverter(logger); convert.Initialize(patamters); var langType = convert.LanguageType(DbProvider.SqlServer, "CSharp", "int"); Assert.Equal("Int16", langType); }