[jboss-cvs] JBossAS SVN: r78236 - projects/aop/trunk/aop/src/test/org/jboss/test/aop/synthetic.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Sep 9 05:55:46 EDT 2008


Author: kabir.khan at jboss.com
Date: 2008-09-09 05:55:45 -0400 (Tue, 09 Sep 2008)
New Revision: 78236

Added:
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/synthetic/Called.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/synthetic/Caller.java
Log:
[JBAOP-635] Test that things are synthetic for caller pointcuts

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/synthetic/Called.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/synthetic/Called.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/synthetic/Called.java	2008-09-09 09:55:45 UTC (rev 78236)
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.synthetic;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class Called
+{
+   public Called()
+   {
+   }
+   
+   public void called()
+   {
+   }
+}

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/synthetic/Caller.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/synthetic/Caller.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/synthetic/Caller.java	2008-09-09 09:55:45 UTC (rev 78236)
@@ -0,0 +1,64 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.synthetic;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class Caller
+{
+   public Caller()
+   {
+      SimpleInterceptor.intercepted = false;
+      Called called = new Called();
+      if (!SimpleInterceptor.intercepted)
+      {
+         throw new RuntimeException("SimpleInterceptor did not intercept");
+      }
+
+      SimpleInterceptor.intercepted = false;
+      called.called();
+      if (!SimpleInterceptor.intercepted)
+      {
+         throw new RuntimeException("SimpleInterceptor did not intercept");
+      }
+   }
+   
+   public void call()
+   {
+      SimpleInterceptor.intercepted = false;
+      Called called = new Called();
+      if (!SimpleInterceptor.intercepted)
+      {
+         throw new RuntimeException("SimpleInterceptor did not intercept");
+      }
+      
+      SimpleInterceptor.intercepted = false;
+      called.called();
+      if (!SimpleInterceptor.intercepted)
+      {
+         throw new RuntimeException("SimpleInterceptor did not intercept");
+      }
+   }
+}




More information about the jboss-cvs-commits mailing list