public void ConvertFrom_InvalidText_ThrowNotSupportedException()
        {
            // Setup
            var converter = new ConfigurationClosingStructureInflowModelTypeConverter();

            // Call
            TestDelegate call = () => converter.ConvertFrom("A");

            // Assert
            Assert.Throws <NotSupportedException>(call);
        }
        public void ConvertFrom_ClosingStructureInflowModelType_ReturnExpectedClosingStructureInflowModelType(ClosingStructureInflowModelType value,
                                                                                                              ConfigurationClosingStructureInflowModelType expectedResult)
        {
            // Setup
            var converter = new ConfigurationClosingStructureInflowModelTypeConverter();

            // Call
            object result = converter.ConvertFrom(value);

            // Assert
            Assert.AreEqual(expectedResult, result);
        }
        public void ConvertFrom_InvalidClosingStructureInflowModelType_ThrowInvalidEnumArgumentException()
        {
            // Setup
            const int invalidValue = -1;
            var       converter    = new ConfigurationClosingStructureInflowModelTypeConverter();

            // Call
            TestDelegate call = () => converter.ConvertFrom((ClosingStructureInflowModelType)invalidValue);

            // Assert
            string expectedMessage = $"The value of argument 'value' ({invalidValue}) is invalid for Enum type '{nameof(ClosingStructureInflowModelType)}'.";
            string parameterName   = TestHelper.AssertThrowsArgumentExceptionAndTestMessage <InvalidEnumArgumentException>(call, expectedMessage).ParamName;

            Assert.AreEqual("value", parameterName);
        }