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 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)); }