public void Test_Can_Convert_String() { IConvertToDatastore mapper = new SqlCompactDBConverter(); string type = mapper.MapType(typeof(string), new Core.Data.DataFieldInfo() { }); Assert.AreEqual("NVARCHAR(200)", type); }
public void Test_Can_Get_Default() { IConvertToDatastore mapper = new SqlCompactDBConverter(); string type = mapper.MapType(this.GetType(), new Core.Data.DataFieldInfo() { }); Assert.AreEqual("nvarchar(200)", type); }
public void Test_Can_Convert_Text() { IConvertToDatastore mapper = new SqlCompactDBConverter(); string type = mapper.MapType(typeof(string), new Core.Data.DataFieldInfo() { DataFieldType = Core.Attributes.FieldType.Text }); Assert.AreEqual("ntext", type); }
public void Test_Can_Convert_char() { IConvertToDatastore mapper = new SqlCompactDBConverter(); string type = mapper.MapType(typeof(char), new Core.Data.DataFieldInfo() { }); Assert.AreEqual("nvarchar(1)", type); }
public void Test_Can_Convert_dates() { IConvertToDatastore mapper = new SqlCompactDBConverter(); string type = mapper.MapType(typeof(DateTime), new Core.Data.DataFieldInfo() { }); Assert.AreEqual("DATETIME", type); }
public void Test_Can_Convert_Unicode_Char() { IConvertToDatastore mapper = new SqlCompactDBConverter(); string type = mapper.MapType(typeof(char), new Core.Data.DataFieldInfo() { DataFieldType = Core.Attributes.FieldType.UnicodeChar }); Assert.AreEqual("nvarchar(1)", type); }
public void Test_Can_Convert_Int64() { IConvertToDatastore mapper = new SqlCompactDBConverter(); string type = mapper.MapType(typeof(long), new Core.Data.DataFieldInfo() { }); Assert.AreEqual("bigint", type); }
public void Test_Can_Override_String_Length_With_Max() { IConvertToDatastore mapper = new SqlCompactDBConverter(); string type = mapper.MapType(typeof(string), new Core.Data.DataFieldInfo() { FieldLength = Int32.MaxValue }); Assert.AreEqual("NVARCHAR(MAX)", type); }
public void Test_Can_Convert_Float() { IConvertToDatastore mapper = new SqlCompactDBConverter(); 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); }