public void Should_retrieve_default_value_using_full_name_of_type_when_invoking_getvaluewithdefault_with_type_and_element_does_not_exists()
        {
            // Given
            var environment  = new DefaultNancyEnvironment();
            var defaultValue = new object();

            environment.AddValue(typeof(string).FullName, new object());

            // When
            var result = environment.GetValueWithDefault(defaultValue);

            // Then
            result.ShouldBeSameAs(defaultValue);
        }
        public void Should_retrieve_value_using_full_name_of_type_when_invoking_getvaluewithdefault_with_type_and_element_exists()
        {
            // Given
            var environment = new DefaultNancyEnvironment();
            var expected = new object();

            environment.AddValue(typeof(object).FullName, expected);

            // When
            var result = environment.GetValueWithDefault(new object());

            // Then
            result.ShouldBeSameAs(expected);
        }
        public void Should_retrieve_value_when_invoking_getvaluewithdefault_with_string_key_and_element_exists()
        {
            // Given
            const string key         = "thekey";
            var          environment = new DefaultNancyEnvironment();
            var          expected    = new object();

            environment.AddValue(key, expected);

            // When
            var result = environment.GetValueWithDefault(key, new object());

            // Then
            result.ShouldBeSameAs(expected);
        }
        public void Should_retrieve_default_value_when_invoking_getvaluewithdefault_with_string_key_and_element_does_not_exists()
        {
            // Given
            const string key = "thekey";
            var environment = new DefaultNancyEnvironment();
            var defaultValue = new object();

            environment.AddValue(typeof(string).FullName, new object());

            // When
            var result = environment.GetValueWithDefault(key, defaultValue);

            // Then
            result.ShouldBeSameAs(defaultValue);
        }
        public void Should_retrieve_value_when_invoking_getvaluewithdefault_with_string_key_and_element_exists()
        {
            // Given
            const string key = "thekey";
            var environment = new DefaultNancyEnvironment();
            var expected = new object();

            environment.AddValue(key, expected);

            // When
            var result = environment.GetValueWithDefault(key, new object());

            // Then
            result.ShouldBeSameAs(expected);
        }