Ejemplo n.º 1
0
        public void WillConvertDBNullToNull()
        {
            DataAdapterDataAttribute attr = new TestableDataAdapterDataAttribute(DBNull.Value);

            List<object[]> results = new List<object[]>(attr.GetData(null, new Type[] { typeof(object) }));

            object[] result = Assert.Single(results);
            object singleResult = Assert.Single(result);
            Assert.Null(singleResult);
        }
Ejemplo n.º 2
0
        public void WillConvertDBNullToNull()
        {
            DataAdapterDataAttribute attr = new TestableDataAdapterDataAttribute(DBNull.Value);

            List <object[]> results = new List <object[]>(attr.GetData(null, new Type[] { typeof(object) }));

            object[] result       = Assert.Single(results);
            object   singleResult = Assert.Single(result);

            Assert.Null(singleResult);
        }
Ejemplo n.º 3
0
        public void WillNotThrowWhenGivenInsufficientParameterTypeLength()
        {
            DataAdapterDataAttribute attr = new TestableDataAdapterDataAttribute(DBNull.Value);

            Assert.DoesNotThrow(() => new List<object[]>(attr.GetData(null, new Type[0])));
        }
Ejemplo n.º 4
0
        public void WillNotThrowWhenGivenInsufficientParameterTypeLength()
        {
            DataAdapterDataAttribute attr = new TestableDataAdapterDataAttribute(DBNull.Value);

            Assert.DoesNotThrow(() => new List <object[]>(attr.GetData(null, new Type[0])));
        }