public void ToByteTest() { DateTime testValue = DateTime.MaxValue; Assert.Throws<InvalidCastException>(() => Convert.ToByte(testValue)); }