public void TestTypeLength() { StaticSQL.Attribute attr = new StaticSQL.Attribute() { DataType = "NVARCHAR(10)" }; Assert.AreEqual("NVARCHAR", attr.SqlDataType); Assert.AreEqual(10, attr.Length); Assert.AreEqual("System.String", attr.DotNetDataType); }
public void TestTypePrecision() { StaticSQL.Attribute attr = new StaticSQL.Attribute() { DataType = "DECIMAL(10,4)" }; Assert.AreEqual("DECIMAL", attr.SqlDataType); Assert.AreEqual(10, attr.Length); Assert.AreEqual(4, attr.Precision); Assert.AreEqual("System.Decimal", attr.DotNetDataType); }
public void TestType() { StaticSQL.Attribute attr = new StaticSQL.Attribute() { DataType = "INT" }; Assert.AreEqual("INT", attr.SqlDataType); Assert.AreEqual("System.Int32", attr.DotNetDataType); }