System.Tests.IsDBNullTests.ToDateTimeTests C# (CSharp) Method

ToDateTimeTests() private method

private ToDateTimeTests ( ) : void
return void
        public void ToDateTimeTests()
        {
            Assert.Throws<InvalidCastException>(() => Convert.ToDateTime(byte.MinValue));
            Assert.Throws<InvalidCastException>(() => Convert.ToDateTime(sbyte.MinValue));
            Assert.Throws<InvalidCastException>(() => Convert.ToDateTime(float.MinValue));
            Assert.Throws<InvalidCastException>(() => Convert.ToDateTime(ushort.MinValue));
            Assert.Throws<InvalidCastException>(() => Convert.ToDateTime(uint.MinValue));
            Assert.Throws<InvalidCastException>(() => Convert.ToDateTime(ulong.MinValue));
        }