public void ExtractParameterOrDefaultFromDictionary_ReturnsDefaultTypeValueIfNoMatchAndNoDefaultParameterValue()
        {
            // Arrange
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            // Act
            object value = ActionDescriptor.ExtractParameterOrDefaultFromDictionary(ParameterExtractionController.IntParameter, dictionary);

            // Assert
            Assert.AreEqual(0, value);
        }
        public void ExtractParameterOrDefaultFromDictionary_ReturnsDictionaryValueIfTypeMatch()
        {
            // Arrange
            Dictionary <string, object> dictionary = new Dictionary <string, object>()
            {
                { "stringParameterNoDefaultValue", "someValue" }
            };

            // Act
            object value = ActionDescriptor.ExtractParameterOrDefaultFromDictionary(ParameterExtractionController.StringParameterNoDefaultValue, dictionary);

            // Assert
            Assert.AreEqual("someValue", value);
        }
        public void ExtractParameterOrDefaultFromDictionary_ReturnsDefaultParameterValueIfMismatch()
        {
            // Arrange
            Dictionary <string, object> dictionary = new Dictionary <string, object>()
            {
                { "stringParameterWithDefaultValue", 42 }
            };

            // Act
            object value = ActionDescriptor.ExtractParameterOrDefaultFromDictionary(ParameterExtractionController.StringParameterWithDefaultValue, dictionary);

            // Assert
            Assert.AreEqual("hello", value);
        }