public void Test_Can_Convert_Unicode_String() { IConvertToDatastore mapper = new SqlServerDBConverter(); string type = mapper.MapType(typeof(string), new Core.Data.DataFieldInfo() { DataFieldType = Core.Attributes.FieldType.UnicodeString }); Assert.AreEqual("nvarchar(200)", type); }
public void Test_Can_Convert_String() { IConvertToDatastore mapper = new SqlServerDBConverter(); string type = mapper.MapType(typeof(string), new Core.Data.DataFieldInfo() { }); Assert.AreEqual("varchar(200)", type); }
public void Test_Can_Get_Default() { IConvertToDatastore mapper = new SqlServerDBConverter(); string type = mapper.MapType(this.GetType(), new Core.Data.DataFieldInfo() { }); Assert.AreEqual("varchar(200)", type); }
public void Test_Can_Convert_Text() { IConvertToDatastore mapper = new SqlServerDBConverter(); string type = mapper.MapType(typeof(string), new Core.Data.DataFieldInfo() { DataFieldType = Core.Attributes.FieldType.Text }); Assert.AreEqual("TEXT", type); }
public void Test_Can_Convert_timespan() { IConvertToDatastore mapper = new SqlServerDBConverter(); string type = mapper.MapType(typeof(TimeSpan), new Core.Data.DataFieldInfo() { }); Assert.AreEqual("time(7)", type); }
public void Test_Can_Convert_dates() { IConvertToDatastore mapper = new SqlServerDBConverter(); string type = mapper.MapType(typeof(DateTime), new Core.Data.DataFieldInfo() { }); Assert.AreEqual("DATETIME", type); }
public void Test_Can_Convert_Bool() { IConvertToDatastore mapper = new SqlServerDBConverter(); string type = mapper.MapType(typeof(bool), new Core.Data.DataFieldInfo() { }); Assert.AreEqual("bit", type); }
public void Test_Can_Convert_ByteArray() { IConvertToDatastore mapper = new SqlServerDBConverter(); string type = mapper.MapType(typeof(byte[]), new Core.Data.DataFieldInfo() { }); Assert.AreEqual("varbinary(MAX)", type); }
public void Test_Can_Override_String_Length_With_Max() { IConvertToDatastore mapper = new SqlServerDBConverter(); string type = mapper.MapType(typeof(string), new Core.Data.DataFieldInfo() { FieldLength = Int32.MaxValue }); Assert.AreEqual("varchar(MAX)", type); }
public void Test_Can_Convert_Float() { IConvertToDatastore mapper = new SqlServerDBConverter(); string type = mapper.MapType(typeof(double), new Core.Data.DataFieldInfo() { }); Assert.AreEqual("real", type); type = mapper.MapType(typeof(float), new Core.Data.DataFieldInfo() { }); Assert.AreEqual("real", type); type = mapper.MapType(typeof(decimal), new Core.Data.DataFieldInfo() { }); Assert.AreEqual("Money", type); }