public void Retrieve_correct_value(string value, string expectation)
        {
            var retriever = new StringValueRetriever();
            var result    = (string)retriever.Retrieve(new KeyValuePair <string, string>(IrrelevantKey, value), IrrelevantType, typeof(string));

            result.Should().Be(expectation);
        }
        public void CanRetrieve(Type type, bool expectation)
        {
            var retriever = new StringValueRetriever();
            var result    = retriever.CanRetrieve(new KeyValuePair <string, string>(IrrelevantKey, IrrelevantKey), IrrelevantType, type);

            result.Should().Be(expectation);
        }
Пример #3
0
        public void Returns_the_string_value_back()
        {
            var retriever = new StringValueRetriever();

            retriever.GetValue("x").Should().Be("x");
            retriever.GetValue("X").Should().Be("X");
            retriever.GetValue("another value").Should().Be("another value");
        }