예제 #1
0
        public void CreateMetaData()
        {
            Assert.Throws<TypeCannotBeUsedAsAClrTypeException>(() => SqlText.GetTypeHandler().CreateMetaData(null));

            SqlTypeHandler col = new SqlText("Test", ParameterDirection.Input);
            var meta = col.CreateMetaData("Test");
            Assert.AreEqual(SqlDbType.Text, meta.SqlDbType);
            Assert.AreEqual(-1, meta.MaxLength);
            Assert.AreEqual("Test", meta.Name);
        }
예제 #2
0
        public void CreateMetaData()
        {
            Assert.Throws <TypeCannotBeUsedAsAClrTypeException>(() => SqlText.GetTypeHandler().CreateMetaData(null));

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

            Assert.AreEqual(SqlDbType.Text, meta.SqlDbType);
            Assert.AreEqual(-1, meta.MaxLength);
            Assert.AreEqual("Test", meta.Name);
        }