コード例 #1
0
        public void GraphTrainPropertiesExtensionsClass_ToYamlGraphTrainPropertiesModelMethod_ReturnsObjectWithCorrectWidthProperty_IfParameterIsNotNull()
        {
            GraphTrainProperties testParam = GetTestObject();

            GraphTrainPropertiesModel testOutput = testParam.ToYamlGraphTrainPropertiesModel();

            Assert.AreEqual(testParam.Width, testOutput.Width);
        }
コード例 #2
0
        public void GraphTrainPropertiesExtensionsClass_ToYamlGraphTrainPropertiesModelMethod_ReturnsObjectWithCorrectColourProperty_IfParameterIsNotNull()
        {
            GraphTrainProperties testParam = GetTestObject();

            GraphTrainPropertiesModel testOutput = testParam.ToYamlGraphTrainPropertiesModel();

            Assert.AreEqual(testParam.Colour.ToArgb().ToString("X8", CultureInfo.InvariantCulture), testOutput.Colour);
        }
コード例 #3
0
        public void GraphTrainPropertiesExtensionsClass_ToYamlGraphTrainPropertiesModelMethod_ReturnsObjectWithCorrectDashStyleNameProperty_IfParameterIsNotNull()
        {
            GraphTrainProperties testParam = GetTestObject();

            GraphTrainPropertiesModel testOutput = testParam.ToYamlGraphTrainPropertiesModel();

            Assert.AreEqual(testParam.DashStyle.ToString("g"), testOutput.DashStyleName);
        }
コード例 #4
0
        public void GraphTrainPropertiesExtensionsClass_ToYamlGraphTrainPropertiesModelMethod_ThrowsNullReferenceException_IfParameterIsNull()
        {
            GraphTrainProperties testParam = null;

            _ = testParam.ToYamlGraphTrainPropertiesModel();

            Assert.Fail();
        }