public void MatchesMethodsWithAGivenName() { Matcher matcher = new MethodNameMatcher("m"); Assert.IsTrue(matcher.Matches(typeof (I).GetMethod("m", new Type[0])), "m()"); Assert.IsTrue(matcher.Matches(typeof (I).GetMethod("m", new[] {typeof (int)})), "m(int)"); Assert.IsTrue(matcher.Matches(typeof (I).GetMethod("m", new[] {typeof (string), typeof (string)})), "m(string,string)"); Assert.IsFalse(matcher.Matches(typeof (I).GetMethod("n", new Type[0])), "n()"); }
public void DoesNotMatchObjectsThatAreNotMethodInfo() { Matcher matcher = new MethodNameMatcher("m"); Assert.IsFalse(matcher.Matches("m")); }