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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jul 23 15:39:26 EDT 2007


Author: flavia.rainone at jboss.com
Date: 2007-07-23 15:39:26 -0400 (Mon, 23 Jul 2007)
New Revision: 64205

Modified:
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/CallerJoinpointScopedTestCase.java
Log:
[JBAOP-445] Tests added

Modified: projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/CallerJoinpointScopedTestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/CallerJoinpointScopedTestCase.java	2007-07-23 19:31:13 UTC (rev 64204)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterthrowingscoped/CallerJoinpointScopedTestCase.java	2007-07-23 19:39:26 UTC (rev 64205)
@@ -61,7 +61,6 @@
       }
    }
    
-   // TODO JBAOP-444
    public void testMethodCall() throws ThrownByTestException
    {
       for (int i = 0; i < 10; i++)
@@ -253,7 +252,7 @@
       String joinPoint1 = callAction + "1";
       String joinPoint2 = callAction + "2";
       
-      // by static method
+      // super by static method
       SuperPOJOCaller.staticMethod(target, callAction, false);
       checkAspects(null, SuperPOJOCaller.class, superJoinPoint, false);
 
@@ -271,6 +270,40 @@
       checkAspects(null, SuperPOJOCaller.class, superJoinPoint, exceptionThrown);
       exceptionThrown = false;
 
+      //super by static method
+      POJOCaller1.staticMethod(target, callAction, false);
+      checkAspects(null, SuperPOJOCaller.class, superJoinPoint, false);
+
+      // super by static method with exception
+      try
+      {
+         POJOCaller1.staticMethod(target, callAction, true);
+      }
+      catch(ThrownByTestException e)
+      {
+         exceptionThrown = true;
+      }
+      assertTrue(exceptionThrown);
+      checkAspects(null, SuperPOJOCaller.class, superJoinPoint, exceptionThrown);
+      exceptionThrown = false;
+
+      //super by static method
+      POJOCaller2.staticMethod(target, callAction, false);
+      checkAspects(null, SuperPOJOCaller.class, superJoinPoint, false);
+
+      // super by static method with exception
+      try
+      {
+         POJOCaller2.staticMethod(target, callAction, true);
+      }
+      catch(ThrownByTestException e)
+      {
+         exceptionThrown = true;
+      }
+      assertTrue(exceptionThrown);
+      checkAspects(null, SuperPOJOCaller.class, superJoinPoint, exceptionThrown);
+      exceptionThrown = false;
+      
       // by static method1
       POJOCaller1.staticMethod1(target, callAction, false);
       checkAspects(null, POJOCaller1.class, joinPoint1, false);




More information about the jboss-cvs-commits mailing list