System.Tests.DateTimeTests.Ctor_Long_InvalidTicks_ThrowsArgumentOutOfRangeException C# (CSharp) Method

Ctor_Long_InvalidTicks_ThrowsArgumentOutOfRangeException() private method

        public static void Ctor_Long_InvalidTicks_ThrowsArgumentOutOfRangeException()
        {
            Assert.Throws<ArgumentOutOfRangeException>("ticks", () => new DateTime(DateTime.MinValue.Ticks - 1)); // Ticks < DateTime.MinValue.Ticks
            Assert.Throws<ArgumentOutOfRangeException>("ticks", () => new DateTime(DateTime.MaxValue.Ticks + 1)); // Ticks > DateTime.MaxValue.Ticks
        }
DateTimeTests