Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
 public void can_partially_match_on_properties()
 {
     var Matcher = new RegexMatcher("^Foo Bar", typeof (RegexTestContext).GetProperty("SomeProperty"));
     Matcher.GetMatch("Foo Bar Baz").ShouldBeOfType<PartialMatch>();
 }
Esempio n. 4
0
 public void SetupContext()
 {
     var matcher = new RegexMatcher("^Some fake method name", typeof(RegexTestContext).GetMethod("MethodWithReturnValue"));
     TestText = "Some fake method name";
     TestMatch = matcher.GetMatch(TestText);
 }
Esempio n. 5
0
 public void can_partially_match_on_fields()
 {
     var Matcher = new RegexMatcher("^Foo Bar", typeof (RegexTestContext).GetField("SomeField"));
     Matcher.GetMatch("Foo Bar Baz").ShouldBeOfType<PartialMatch>();
 }
Esempio n. 6
0
 public void SetupContext()
 {
     var matcher = new RegexMatcher("^Some fake method name", null);
     TestMatch = matcher.GetMatch("this does not match");
 }