public void DocumentOptionsModelExtensionsClass_ToDocumentOptionsMethod_ThrowsNullReferenceException_IfParameterIsNull()
        {
            DocumentOptionsModel testParam = null;

            testParam.ToDocumentOptions();

            Assert.Fail();
        }
        public void DocumentOptionsModelExtensionsClass_ToDocumentOptionsMethod_ThrowsArgumentNullException_IfParameterIsNull()
        {
            DocumentOptionsModel testObject = null;

            _ = testObject.ToDocumentOptions();

            Assert.Fail();
        }
        public void DocumentOptionsModelExtensionsClass_ToDocumentOptionsMethod_ReturnsObjectWithClockTypePropertyEqualToTwentyFourHourClock_IfParameterHasClockTypeNamePropertyEqualToTwentyFourHourClock()
        {
            DocumentOptionsModel testParam = GetModel();

            testParam.ClockTypeName = "TwentyFourHourClock";

            DocumentOptions testOutput = testParam.ToDocumentOptions();

            Assert.AreEqual(ClockType.TwentyFourHourClock, testOutput.ClockType);
        }
        public void DocumentOptionsModelExtensionsClass_ToDocumentOptionsMethod_ReturnsObjectWithDisplayTrainLabelsOnGraphsPropertyEqualToTrue_IfParameterHasDisplayTrainLabelsOnGraphsPropertyEqualToNull()
        {
            DocumentOptionsModel testParam = GetModel();

            testParam.DisplayTrainLabelsOnGraphs = null;

            DocumentOptions testOutput = testParam.ToDocumentOptions();

            Assert.IsTrue(testOutput.DisplayTrainLabelsOnGraphs);
        }
        public void DocumentOptionsModelExtensionsClass_ToDocumentOptionsMethod_ReturnsObjectWithGraphEditStylePropertyEqualToPreserveSectionTimes_IfParameterHasGraphEditStylePropertyEqualToNull()
        {
            DocumentOptionsModel testParam = GetModel();

            testParam.GraphEditStyle = null;

            DocumentOptions testOutput = testParam.ToDocumentOptions();

            Assert.AreEqual(GraphEditStyle.PreserveSectionTimes, testOutput.GraphEditStyle);
        }
        public void DocumentOptionsModelExtensionsClass_ToDocumentOptionsMethod_ReturnsObjectWithGraphEditStylePropertyEqualToPreserveSectionTimes_IfParameterHasGraphEditStylePropertyThatIsNotAValidValue()
        {
            DocumentOptionsModel testParam = GetModel();

            testParam.GraphEditStyle = _rnd.NextDefinitelyInvalidString(_validGraphEditStyles);

            DocumentOptions testOutput = testParam.ToDocumentOptions();

            Assert.AreEqual(GraphEditStyle.PreserveSectionTimes, testOutput.GraphEditStyle);
        }
        public void DocumentOptionsModelExtensionsClass_ToDocumentOptionsMethod_ReturnsObjectWithGraphEditStylePropertyEqualToFree_IfParameterHasGraphEditStylePropertyEqualToFree()
        {
            DocumentOptionsModel testParam = GetModel();

            testParam.GraphEditStyle = "Free";

            DocumentOptions testOutput = testParam.ToDocumentOptions();

            Assert.AreEqual(GraphEditStyle.Free, testOutput.GraphEditStyle);
        }
        public void DocumentOptionsModelExtensionsClass_ToDocumentOptionsMethod_ReturnsObjectWithClockTypePropertyEqualToTwelveHourClock_IfParameterHasClockTypeNamePropertyIsNotAValidEnumValue()
        {
            DocumentOptionsModel testParam = GetModel();

            testParam.ClockTypeName = _rnd.NextDefinitelyInvalidString(_validClockTypes);

            DocumentOptions testOutput = testParam.ToDocumentOptions();

            Assert.AreEqual(ClockType.TwelveHourClock, testOutput.ClockType);
        }
        public void DocumentOptionsModelExtensionsClassToDocumentOptionsMethodReturnsDocumentOptionsObjectWithGraphEditStylePropertyEqualToPreserveSectionTimesIfArgumentGraphEditStylePropertyIsNull()
        {
            DocumentOptionsModel testObject = new DocumentOptionsModel {
                GraphEditStyle = null
            };

            DocumentOptions resultObject = testObject.ToDocumentOptions();

            Assert.AreEqual(GraphEditStyle.PreserveSectionTimes, resultObject.GraphEditStyle);
        }
        public void DocumentOptionsModelExtensionsClassToDocumentOptionsMethodReturnsDocumentOptionsObjectWithCorrectGraphEditStylePropertyIfArgumentGraphEditStylePropertyEqualsFree()
        {
            DocumentOptionsModel testObject = new DocumentOptionsModel {
                GraphEditStyle = "Free"
            };

            DocumentOptions resultObject = testObject.ToDocumentOptions();

            Assert.AreEqual(GraphEditStyle.Free, resultObject.GraphEditStyle);
        }
        public void DocumentOptionsModelExtensionsClassToDocumentOptionsMethodReturnsDocumentOptionsObjectWithCorrectClockTypePropertyIfArgumentClockTypeNamePropertyEqualsTwentyFourHourClock()
        {
            DocumentOptionsModel testObject = new DocumentOptionsModel {
                ClockTypeName = "TwentyFourHourClock"
            };

            DocumentOptions resultObject = testObject.ToDocumentOptions();

            Assert.AreEqual(ClockType.TwentyFourHourClock, resultObject.ClockType);
        }
        public void DocumentOptionsModelExtensionsClass_ToDocumentOptionsMethod_ThrowsArgumentNullExceptionWithCorrectParamNameProperty_IfParameterIsNull()
        {
            DocumentOptionsModel testObject = null;

            try
            {
                _ = testObject.ToDocumentOptions();
                Assert.Fail();
            }
            catch (ArgumentNullException ex)
            {
                Assert.AreEqual("model", ex.ParamName);
            }
        }