System.Tests.IsDBNullTests.ToDateTimeTests C# (CSharp) 메소드

ToDateTimeTests() 개인적인 메소드

private ToDateTimeTests ( ) : void
리턴 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));
        }