Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 public void TestType()
 {
     StaticSQL.Attribute attr = new StaticSQL.Attribute() { DataType = "INT" };
     Assert.AreEqual("INT", attr.SqlDataType);
     Assert.AreEqual("System.Int32", attr.DotNetDataType);
 }