public void GetProperties_should_return_all_dictionary_items()
        {
            DictionarySource dictionarySource = new DictionarySource(new Dictionary<string, Type>()
                {
                    {"Number", typeof(int)},
                    {"Text", typeof(string)},
                });

            var result = dictionarySource.GetProperties();
            Assert.AreEqual(2, result.Count());
            result.ShouldContainsKeyAndValue("Number", typeof(int));
            result.ShouldContainsKeyAndValue("Text", typeof(string));
        }
Пример #2
0
 private static TypeDescription GetTypeDescription(string typeName, IDictionary<string, Type> properties)
 {
     var propertySource = new DictionarySource(properties);
     var typeDescription = new TypeDescription(typeName, propertySource.GetProperties());
     return typeDescription;
 }
 public void Ctor_should_throw_exception_when_value_is_null()
 {
     DictionarySource dictionarySource = new DictionarySource(null);
 }