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));
        }
Esempio n. 2
0
        private static TypeDescription GetTypeDescription(MethodInfo method)
        {
            var propertySource  = new MethodSource(method);
            var typeDescription = new TypeDescription(method.DeclaringType.FullName + "+" + method.Name, propertySource.GetProperties());

            return(typeDescription);
        }