public void ExactMatch()
 {
     pointcut.Pattern = "System.Object.GetHashCode";
     ExactMatchTests(pointcut);
     pointcut = (AbstractRegularExpressionMethodPointcut)SerializationTestUtils.SerializeAndDeserialize(pointcut);
     ExactMatchTests(pointcut);
 }
 public void ExactMatchWithGenericType()
 {
     pointcut.Pattern = "System.Collections.Generic.List<string>.Add";
     ExactMatchWithGenericTypeTests(pointcut);
     pointcut = (AbstractRegularExpressionMethodPointcut)SerializationTestUtils.SerializeAndDeserialize(pointcut);
     ExactMatchWithGenericTypeTests(pointcut);
 }
 /// <summary>
 /// Initialises the pointcut.
 /// </summary>
 protected void InitPointcut()
 {
     pointcut = new SdkRegularExpressionMethodPointcut();
 }
 protected void ExactMatchWithGenericTypeTests(AbstractRegularExpressionMethodPointcut rpc)
 {
     // assumes rpc.setPattern("System.Collections.Generic.List<string>");
     Assert.IsTrue(rpc.Matches(typeof(System.Collections.Generic.List <string>).GetMethod("Add"), typeof(int)));
     Assert.IsFalse(rpc.Matches(typeof(System.Collections.Generic.List <string>).GetMethod("GetType"), typeof(Type)));
 }
 protected void NoPatternSuppliedTests(AbstractRegularExpressionMethodPointcut rpc)
 {
     Assert.IsFalse(rpc.Matches(typeof(object).GetMethod("GetHashCode"), typeof(int)));
     Assert.IsFalse(rpc.Matches(typeof(object).GetMethod("GetType"), typeof(Type)));
     Assert.AreEqual(0, rpc.Patterns.Length);
 }
 public void SerializationWithNoPatternSupplied()
 {
     pointcut = (AbstractRegularExpressionMethodPointcut)SerializationTestUtils.SerializeAndDeserialize(pointcut);
     NoPatternSuppliedTests(pointcut);
 }
 protected void SetUp()
 {
     pointcut = GetRegexpMethodPointcut();
 }
 protected void ExactMatchTests(AbstractRegularExpressionMethodPointcut rpc)
 {
     // assumes rpc.setPattern("java.lang.Object.hashCode");
     Assert.IsTrue(rpc.Matches(typeof(object).GetMethod("GetHashCode"), typeof(int)));
     Assert.IsFalse(rpc.Matches(typeof(object).GetMethod("GetType"), typeof(Type)));
 }