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);
        }
Beispiel #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);
        }
        public void WillNotThrowWhenGivenInsufficientParameterTypeLength()
        {
            DataAdapterDataAttribute attr = new TestableDataAdapterDataAttribute(DBNull.Value);

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

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