public void TimeOfDayClass_CopyAndReflectMethod_ThrowsArgumentNullExceptionIfParameterIsNull()
        {
            int       origTime   = _rnd.Next(86380) + 10;
            TimeOfDay testObject = new TimeOfDay(origTime);

            testObject.CopyAndReflect(null);

            Assert.Fail();
        }
        public void TimeOfDayClass_CopyAndReflectMethod_ReturnsObjectWithCorrectTimeIfReflectedInPriorObject()
        {
            int       origTime          = _rnd.Next(86380);
            TimeOfDay testObject        = new TimeOfDay(origTime);
            int       reflectAroundSecs = _rnd.Next(origTime / 2) + origTime / 2;
            TimeOfDay testParam         = new TimeOfDay(reflectAroundSecs);

            TimeOfDay testOutput = testObject.CopyAndReflect(testParam);

            Assert.AreEqual(reflectAroundSecs * 2 - origTime, testOutput.AbsoluteSeconds);
        }
        public void TimeOfDayClass_CopyAndReflectMethod_DoesNotChangeOriginalObject()
        {
            int       origTime          = _rnd.Next(86380) + 10;
            TimeOfDay testObject        = new TimeOfDay(origTime);
            int       reflectAroundSecs = _rnd.Next((86400 - origTime) / 2 + origTime / 2) + (origTime / 2);
            TimeOfDay testParam         = new TimeOfDay(reflectAroundSecs);

            _ = testObject.CopyAndReflect(testParam);

            Assert.AreEqual(origTime, testObject.AbsoluteSeconds);
        }
        public void TimeOfDayClass_CopyAndReflectMethod_ReturnsDifferentObject()
        {
            int       origTime          = _rnd.Next(86380) + 10;
            TimeOfDay testObject        = new TimeOfDay(origTime);
            int       reflectAroundSecs = _rnd.Next((86400 - origTime) / 2 + origTime / 2) + (origTime / 2);
            TimeOfDay testParam         = new TimeOfDay(reflectAroundSecs);

            TimeOfDay testOutput = testObject.CopyAndReflect(testParam);

            Assert.AreNotSame(testObject, testOutput);
        }
        public void TimeOfDayClass_CopyAndReflectMethod_ThrowsArgumentNullExceptionWithCorrectParamNamePropertyIfParameterIsNull()
        {
            int       origTime   = _rnd.Next(86380) + 10;
            TimeOfDay testObject = new TimeOfDay(origTime);

            try
            {
                testObject.CopyAndReflect(null);
                Assert.Fail();
            }
            catch (ArgumentNullException ex)
            {
                Assert.AreEqual("aroundTime", ex.ParamName);
            }
        }