示例#1
0
        public void CreateMetaData()
        {
            Assert.Throws <TypeCannotBeUsedAsAClrTypeException>(() => SqlDateTime.GetTypeHandler().CreateMetaData(null));

            SqlTypeHandler col  = new SqlDateTime(testDateTime, ParameterDirection.Input);
            var            meta = col.CreateMetaData("Test");

            Assert.AreEqual(SqlDbType.DateTime, meta.SqlDbType);
            Assert.AreEqual("Test", meta.Name);
        }
示例#2
0
 public void CreateParamFromValue()
 {
     Assert.Throws <TypeCannotBeUsedAsAClrTypeException>(() => SqlDateTime.GetTypeHandler().CreateParamFromValue("Test", null));
 }
示例#3
0
 public void GetTypeHandler()
 {
     Assert.IsInstanceOf <SqlTypeHandler>(SqlDateTime.GetTypeHandler());
 }