public void GetProperties_should_return_all_parameters_from_simple_method() { var method = this.GetType().GetMethod("SimpleClass", BindingFlags.Instance | BindingFlags.NonPublic); MethodSource methodSource = new MethodSource(method); var result = methodSource.GetProperties(); Assert.AreEqual(2, result.Count()); result.ShouldContainsKeyAndValue("Number", typeof(int)); result.ShouldContainsKeyAndValue("Text", typeof(string)); }
private static TypeDescription GetTypeDescription(MethodInfo method) { var propertySource = new MethodSource(method); var typeDescription = new TypeDescription(method.DeclaringType.FullName + "+" + method.Name, propertySource.GetProperties()); return typeDescription; }
public void Ctor_should_throw_exception_when_value_is_null() { MethodSource methodSource = new MethodSource(null); }