private string DescribeParameter(RegexMatcher matcher, int currentParam)
        {
            string s;
            var param = ((MethodInfo) matcher.MemberInfo).GetParameters().ElementAt(currentParam);

            s = _parameterDescriber.DescribeParameter(param.ParameterType, param.Name);
            return s;
        }
 public void SetupContext()
 {
     var matcher = new RegexMatcher("^Some fake method name (.+)",
                                    typeof (RegexTestContext).GetMethod("MethodWithParams"));
     TestText = "Some fake method name and some other text";
     TestMatch = matcher.GetMatch(TestText);
 }
 public void No_partial_matching_on_void_methods()
 {
     var Matcher = new RegexMatcher("^Some fake method name", typeof (RegexTestContext).GetMethod("VoidMethod"));
     Matcher.GetMatch("Some fake method name blah blah blah").ShouldBeNull();
 }
 public void can_partially_match_on_properties()
 {
     var Matcher = new RegexMatcher("^Foo Bar", typeof (RegexTestContext).GetProperty("SomeProperty"));
     Matcher.GetMatch("Foo Bar Baz").ShouldBeOfType<PartialMatch>();
 }
 public void SetupContext()
 {
     var matcher = new RegexMatcher("^Some fake method name", typeof(RegexTestContext).GetMethod("MethodWithReturnValue"));
     TestText = "Some fake method name";
     TestMatch = matcher.GetMatch(TestText);
 }
 public void can_partially_match_on_fields()
 {
     var Matcher = new RegexMatcher("^Foo Bar", typeof (RegexTestContext).GetField("SomeField"));
     Matcher.GetMatch("Foo Bar Baz").ShouldBeOfType<PartialMatch>();
 }
 public void SetupContext()
 {
     var matcher = new RegexMatcher("^Some fake method name", null);
     TestMatch = matcher.GetMatch("this does not match");
 }