コード例 #1
0
        public void Cannot_retrieve_other_properties()
        {
            var retriever = new StringListValueRetriever();

            retriever.CanRetrieve(new KeyValuePair <string, string>(), null, typeof(string[])).Should().BeFalse();
            retriever.CanRetrieve(new KeyValuePair <string, string>(), null, typeof(List <int>)).Should().BeFalse();
            retriever.CanRetrieve(new KeyValuePair <string, string>(), null, typeof(string)).Should().BeFalse();
        }
コード例 #2
0
        public void Returns_lsit_from_comma_separated_list()
        {
            var retriever = new StringListValueRetriever();

            var result = retriever.GetValue("A,B,C");

            result[0].Should().Be("A");
            result[1].Should().Be("B");
            result[2].Should().Be("C");
            result.Count.Should().Be(3);
        }
コード例 #3
0
        public void Can_retrieve_string_ilist_properties()
        {
            var retriever = new StringListValueRetriever();

            retriever.CanRetrieve(new KeyValuePair <string, string>(), null, typeof(IList <string>)).Should().BeTrue();
        }