[jboss-cvs] JBossAS SVN: r64745 - in projects/aop/trunk/aop/src: resources/test/beforeafterArgs and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Aug 21 12:51:37 EDT 2007
Author: flavia.rainone at jboss.com
Date: 2007-08-21 12:51:37 -0400 (Tue, 21 Aug 2007)
New Revision: 64745
Added:
projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs/ArgInvalidTestCase.java
projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs/ArgsInvalidTestCase.java
Modified:
projects/aop/trunk/aop/src/main/org/jboss/aop/advice/annotation/ParameterAnnotationRuleException.java
projects/aop/trunk/aop/src/resources/test/beforeafterArgs/jboss-aop.xml
projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs/ArgsInvalidPOJO.java
Log:
[JBAOP-387] Added tests for invalid advices with @Arg and Args-annotated parameters.
Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/advice/annotation/ParameterAnnotationRuleException.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/advice/annotation/ParameterAnnotationRuleException.java 2007-08-21 16:26:56 UTC (rev 64744)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/advice/annotation/ParameterAnnotationRuleException.java 2007-08-21 16:51:37 UTC (rev 64745)
@@ -7,7 +7,7 @@
*
* @author Flavia Rainone
*/
-class ParameterAnnotationRuleException extends InvalidAdviceException
+public class ParameterAnnotationRuleException extends InvalidAdviceException
{
private static final long serialVersionUID = 9190978361997650638L;
Modified: projects/aop/trunk/aop/src/resources/test/beforeafterArgs/jboss-aop.xml
===================================================================
--- projects/aop/trunk/aop/src/resources/test/beforeafterArgs/jboss-aop.xml 2007-08-21 16:26:56 UTC (rev 64744)
+++ projects/aop/trunk/aop/src/resources/test/beforeafterArgs/jboss-aop.xml 2007-08-21 16:51:37 UTC (rev 64745)
@@ -18,12 +18,27 @@
<after name="after4" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
- <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch1(..))">
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch1Around1(..))">
<around name="around1" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch1Around2(..))">
<around name="around2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch1Around3(..))">
<around name="around3" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch1After2(..))">
<after name="after2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch1After3(..))">
<after name="after3" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch1After5(..))">
<after name="after5" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
@@ -38,11 +53,23 @@
<finally name="finally1" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
- <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch2(..))">
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch2Before3(..))">
<before name="before3" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch2After1(..))">
<after name="after1" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch2After2(..))">
<after name="after2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch2After3(..))">
<after name="after3" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch2After5(..))">
<after name="after5" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
@@ -56,11 +83,23 @@
<finally name="finally2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
- <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch3(..))">
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch3Before3(..))">
<before name="before3" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch3After1(..))">/>
<after name="after1" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch3After2(..))">
<after name="after2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch3After3(..))">
<after name="after3" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch3After5(..))">
<after name="after5" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
@@ -72,7 +111,7 @@
<around name="around6" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
- <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch4(..))">
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch4Before3(..))">
<before name="before3" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
@@ -83,7 +122,7 @@
<before name="before5" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
- <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch5(..))">
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch5Before3(..))">
<before name="before3" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
@@ -93,10 +132,19 @@
<after name="after6" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
- <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch6(..))">
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch6After1(..))">
<after name="after1" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch6After2(..))">
<after name="after2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch6After3(..))">
<after name="after3" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch6After5(..))">
<after name="after5" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
@@ -108,10 +156,19 @@
<finally name="finally2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
- <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch7(..))">
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch7After1(..))">
<after name="after1" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch7After2(..))">
<after name="after2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch7After3(..))">
<after name="after3" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch7After5(..))">
<after name="after5" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
@@ -120,10 +177,19 @@
<after name="after6" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
- <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch8(..))">
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch8After1(..))">
<after name="after1" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch8After2(..))">
<after name="after2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch8After3(..))">
<after name="after3" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch8After5(..))">
<after name="after5" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
@@ -134,10 +200,19 @@
<finally name="finally2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
- <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch9(..))">
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch9After1(..))">
<after name="after1" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch9After2(..))">
<after name="after2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch9After3(..))">
<after name="after3" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->bunch9After5(..))">
<after name="after5" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspect"/>
</bind>
@@ -161,16 +236,43 @@
<finally name="finally3" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInterfaces"/>
</bind>
- <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*(org.jboss.test.aop.beforeafterArgs.Interface))">
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Before4(org.jboss.test.aop.beforeafterArgs.Interface))">
<before name="before4" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInterfaces"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Before5(org.jboss.test.aop.beforeafterArgs.Interface))">
<before name="before5" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInterfaces"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Around4(org.jboss.test.aop.beforeafterArgs.Interface))">
<around name="around4" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInterfaces"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Around5(org.jboss.test.aop.beforeafterArgs.Interface))">
<around name="around5" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInterfaces"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*After4(org.jboss.test.aop.beforeafterArgs.Interface))">
<after name="after4" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInterfaces"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*After5(org.jboss.test.aop.beforeafterArgs.Interface))">
<after name="after5" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInterfaces"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Throwing4(org.jboss.test.aop.beforeafterArgs.Interface))">
<throwing name="throwing4" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInterfaces"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Throwing5(org.jboss.test.aop.beforeafterArgs.Interface))">
<throwing name="throwing5" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInterfaces"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Finally4(org.jboss.test.aop.beforeafterArgs.Interface))">
<finally name="finally4" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInterfaces"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Finally5(org.jboss.test.aop.beforeafterArgs.Interface))">
<finally name="finally5" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInterfaces"/>
</bind>
@@ -184,11 +286,23 @@
<finally name="finally1" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInvertedArgs"/>
</bind>
- <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*(java.lang.String,java.util.Collection))">
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Before2(java.lang.String,java.util.Collection))">
<before name="before2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInvertedArgs"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Around2(java.lang.String,java.util.Collection))">
<around name="around2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInvertedArgs"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*After2(java.lang.String,java.util.Collection))">
<after name="after2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInvertedArgs"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Throwing2(java.lang.String,java.util.Collection))">
<throwing name="throwing2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInvertedArgs"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Finally2(java.lang.String,java.util.Collection))">
<finally name="finally2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectInvertedArgs"/>
</bind>
@@ -222,20 +336,59 @@
<finally name="finally6" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectGenerics"/>
</bind>
- <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*(java.util.List))">
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Before7(java.util.List))">
<before name="before7" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectGenerics"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Before8(java.util.List))">
<before name="before8" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectGenerics"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Around5(java.util.List))">
<around name="around5" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectGenerics"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Around7(java.util.List))">
<around name="around7" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectGenerics"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Around8(java.util.List))">
<around name="around8" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectGenerics"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*After5(java.util.List))">/>
<after name="after5" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectGenerics"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*After7(java.util.List))">
<after name="after7" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectGenerics"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*After8(java.util.List))">
<after name="after8" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectGenerics"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Throwing2(java.util.List))">
<throwing name="throwing2" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectGenerics"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Throwing7(java.util.List))">
<throwing name="throwing7" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectGenerics"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Throwing8(java.util.List))">
<throwing name="throwing8" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectGenerics"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Finally5(java.util.List))">
<finally name="finally5" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectGenerics"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Finally7(java.util.List))">
<finally name="finally7" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectGenerics"/>
+ </bind>
+
+ <bind pointcut="execution(void org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->*Finally8(java.util.List))">
<finally name="finally8" aspect="org.jboss.test.aop.beforeafterArgs.ArgAspectGenerics"/>
</bind>
@@ -248,8 +401,11 @@
<before name="before3" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
</bind>
- <bind pointcut="field(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->field1)">
+ <bind pointcut="field(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->field1Before4)">
<before name="before4" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
+ </bind>
+
+ <bind pointcut="field(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->field1Before5)">
<before name="before5" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
</bind>
@@ -259,8 +415,11 @@
<finally name="finally3" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
</bind>
- <bind pointcut="set(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->field2)">
+ <bind pointcut="set(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->field2NonexistentAdvice)">
<before name="XXX6" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
+ </bind>
+
+ <bind pointcut="set(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->field2Finally2)">
<finally name="finally2" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
</bind>
@@ -271,11 +430,14 @@
<after name="after3" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
</bind>
- <bind pointcut="field(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->field3)">
+ <bind pointcut="field(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->field3After4)">
<after name="after4" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
+ </bind>
+
+ <bind pointcut="field(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->field3After5)">
<after name="after5" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
</bind>
-
+
<bind pointcut="field(* org.jboss.test.aop.beforeafterArgs.ArgsPOJO->field4)">
<before name="before1" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
<before name="before2" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
@@ -287,11 +449,23 @@
<finally name="finally1" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
</bind>
- <bind pointcut="field(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->field4)">
+ <bind pointcut="field(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->field4Before4)">
<before name="before4" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
+ </bind>
+
+ <bind pointcut="field(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->field4Before5)">
<before name="before5" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
+ </bind>
+
+ <bind pointcut="field(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->field4After4)">
<after name="after4" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
+ </bind>
+
+ <bind pointcut="field(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->field4After5)">
<after name="after5" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
+ </bind>
+
+ <bind pointcut="field(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->field4Finally2)">
<finally name="finally2" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
</bind>
@@ -308,7 +482,7 @@
<finally name="finally1" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
</bind>
- <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->method2(..))">
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->method2Finally2(..))">
<finally name="finally2" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
</bind>
@@ -325,7 +499,7 @@
<finally name="finally1" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
</bind>
- <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->method4(..))">
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->method4Finally2(..))">
<finally name="finally2" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
</bind>
@@ -338,7 +512,7 @@
<finally name="finally1" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
</bind>
- <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->method6(..))">
+ <bind pointcut="execution(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->method6Finally2(..))">
<finally name="finally2" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
</bind>
@@ -357,7 +531,7 @@
<finally name="finally1" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
</bind>
- <bind pointcut="call(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->method6(..)) AND withincode(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->method8(..))">
+ <bind pointcut="call(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->method6Finally2(..)) AND withincode(* org.jboss.test.aop.beforeafterArgs.ArgsInvalidPOJO->method8Finally2(..))">
<finally name="finally2" aspect="org.jboss.test.aop.beforeafterArgs.ArgsAspect"/>
</bind>
Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs/ArgInvalidTestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs/ArgInvalidTestCase.java (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs/ArgInvalidTestCase.java 2007-08-21 16:51:37 UTC (rev 64745)
@@ -0,0 +1,1120 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.beforeafterArgs;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+import org.jboss.aop.advice.NoMatchingAdviceException;
+import org.jboss.aop.advice.annotation.ParameterAnnotationRuleException;
+import org.jboss.test.aop.AOPTestWithSetup;
+
+/**
+ * Tests the use of @Arg parameters with invalid advices.
+ *
+ * @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ *
+ * @see ArgsInvalidTestCase
+ */
+public class ArgInvalidTestCase extends AOPTestWithSetup
+{
+ private ArgsInvalidPOJO pojo;
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ArgTestCase");
+ suite.addTestSuite(ArgInvalidTestCase.class);
+ return suite;
+ }
+
+ public ArgInvalidTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ this.pojo = new ArgsInvalidPOJO();
+ ArgAspect.clear();
+ ArgAspectInterfaces.clear();
+ ArgAspectInvertedArgs.clear();
+ ArgAspectGenerics.clear();
+ }
+
+ public void test1()
+ {
+ boolean thrown = false;
+ try
+ {
+ this.pojo.bunch1Around1(5, (double) 1.3, (float) 0, "test1", 1);
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch1Around2(5, (double) 1.3, (float) 0, "test1", 1);
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch1Around3(5, (double) 1.3, (float) 0, "test1", 1);
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch1After2(5, (double) 1.3, (float) 0, "test1", 1);
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch1After3(5, (double) 1.3, (float) 0, "test1", 1);
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch1After5(5, (double) 1.3, (float) 0, "test1", 1);
+ }
+ catch (ParameterAnnotationRuleException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test2()
+ {
+ boolean thrown = false;
+ try
+ {
+ this.pojo.bunch2Before3(1, (double) 2.0, (float) 3, 4);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch2After1(1, (double) 2.0, (float) 3, 4);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch2After2(1, (double) 2.0, (float) 3, 4);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch2After3(1, (double) 2.0, (float) 3, 4);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch2After5(1, (double) 2.0, (float) 3, 4);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test3()
+ {
+ boolean thrown = false;
+ try
+ {
+ this.pojo.bunch3Before3(1, (double) 2.0, (float) 3, 4);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch3After1(1, (double) 2.0, (float) 3, 4);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch3After2(1, (double) 2.0, (float) 3, 4);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch3After3(1, (double) 2.0, (float) 3, 4);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch3After5(1, (double) 2.0, (float) 3, 4);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test4()
+ {
+ boolean thrown = false;
+ try
+ {
+ this.pojo.bunch4Before3(10, (double) 9.0, (float) 8.0, 7);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test5()
+ {
+ boolean thrown = false;
+ try
+ {
+ this.pojo.bunch5Before3(10, (double) 9.0, (float) 8.0, 7);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test6()
+ {
+ boolean thrown = false;
+ try
+ {
+ this.pojo.bunch6After1(51, (double) 5.3, (float) 61, 131);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch6After2(51, (double) 5.3, (float) 61, 131);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch6After3(51, (double) 5.3, (float) 61, 131);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch6After5(51, (double) 5.3, (float) 61, 131);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test7()
+ {
+ boolean thrown = false;
+ try
+ {
+ this.pojo.bunch7After1(15, (double) 3.5, (float) 16, 131);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch7After2(15, (double) 3.5, (float) 16, 131);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch7After3(15, (double) 3.5, (float) 16, 131);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch7After5(15, (double) 3.5, (float) 16, 131);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test8()
+ {
+ boolean thrown = false;
+ try
+ {
+ this.pojo.bunch8After1(51, (double) 5.3, (float) 61, 131);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch8After2(51, (double) 5.3, (float) 61, 131);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch8After3(51, (double) 5.3, (float) 61, 131);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch8After5(51, (double) 5.3, (float) 61, 131);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test9()
+ {
+ boolean thrown = false;
+ try
+ {
+ this.pojo.bunch9After1(15, (double) 3.5, (float) 16, 131);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch9After2(15, (double) 3.5, (float) 16, 131);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch9After3(15, (double) 3.5, (float) 16, 131);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.bunch9After5(15, (double) 3.5, (float) 16, 131);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test10() throws POJOException
+ {
+ boolean thrown = false;
+ try
+ {
+ this.pojo.method9Before4(new Implementor());
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method9Before5(new Implementor());
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method9Around4(new Implementor());
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method9Around5(new Implementor());
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method9After4(new Implementor());
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method9After5(new Implementor());
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method9Throwing4(new Implementor());
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method9Throwing5(new Implementor());
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method9Finally4(new Implementor());
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method9Finally5(new Implementor());
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test11() throws POJOException
+ {
+ boolean thrown = false;
+ try
+ {
+ this.pojo.method10Before4(null);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method10Before5(null);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method10Around4(null);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method10Around5(null);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method10After4(null);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method10After5(null);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method10Throwing4(null);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method10Throwing5(null);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method10Finally4(null);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ this.pojo.method10Finally5(null);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void testInverted1()
+ {
+ boolean thrown = false;
+ try
+ {
+ pojo.method11Before2("testInverted", null);
+ }
+ catch (ParameterAnnotationRuleException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method11Around2("testInverted", null);
+ }
+ catch (ParameterAnnotationRuleException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method11After2("testInverted", null);
+ }
+ catch (ParameterAnnotationRuleException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method11Throwing2("testInverted", null);
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void testInverted2() throws POJOException
+ {
+ boolean thrown = false;
+ try
+ {
+ pojo.method12Before2("testInverted", null);
+ }
+ catch(ParameterAnnotationRuleException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method12Around2("testInverted", null);
+ }
+ catch(ParameterAnnotationRuleException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method12After2("testInverted", null);
+ }
+ catch(ParameterAnnotationRuleException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method12Throwing2("testInverted", null);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method12Finally2("testInverted", null);
+ }
+ catch(ParameterAnnotationRuleException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void testGenerics1()
+ {
+ List<SuperValue> list = new ArrayList<SuperValue>();
+ boolean thrown = false;
+ try
+ {
+ pojo.method13Before7(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method13Before8(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method13Around5(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method13Around7(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method13Around8(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method13After5(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method13After7(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method13After8(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method13Throwing2(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method13Throwing7(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method13Throwing8(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method13Finally5(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method13Finally7(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method13Finally8(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void testGenerics2() throws POJOException
+ {
+ List<SuperValue> list = new ArrayList<SuperValue>();
+ boolean thrown = false;
+ try
+ {
+ pojo.method14Before7(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method14Before8(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method14Around5(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method14Around7(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method14Around8(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method14After5(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method14After7(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method14After8(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method14Throwing2(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method14Throwing7(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method14Throwing8(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method14Finally5(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method14Finally7(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.method14Finally8(list);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+}
\ No newline at end of file
Modified: projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs/ArgsInvalidPOJO.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs/ArgsInvalidPOJO.java 2007-08-21 16:26:56 UTC (rev 64744)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs/ArgsInvalidPOJO.java 2007-08-21 16:51:37 UTC (rev 64745)
@@ -32,93 +32,449 @@
*/
public class ArgsInvalidPOJO
{
- public Object field1;
+ /* Object field1 */
+ public Object field1Before4;
+ public Object field1Before5;
- public String field2;
+ /* String field2 */
+ public String field2NonexistentAdvice;
+ public String field2Finally2;
- public int field3;
+ /* int field3 */
+ public int field3After4;
+ public int field3After5;
+
+ /* boolean field4 */
+ public static boolean field4Before4;
+ public static boolean field4Before5;
+ public static boolean field4After4;
+ public static boolean field4After5;
+ public static boolean field4Finally2;
- public static boolean field4;
+ /* bunch1(int, double, float, String, int) */
- public int bunch1(int x, double y, float z, String str, int q)
+ public int bunch1Around1(int x, double y, float z, String str, int q)
{
return x + (int) y + (int) z + q;
}
- public int bunch2(int x, double y, float z, int q)
+ public int bunch1Around2(int x, double y, float z, String str, int q)
{
+ return x + (int) y + (int) z + q;
+ }
+
+ public int bunch1Around3(int x, double y, float z, String str, int q)
+ {
+ return x + (int) y + (int) z + q;
+ }
+
+ public int bunch1After2(int x, double y, float z, String str, int q)
+ {
+ return x + (int) y + (int) z + q;
+ }
+
+ public int bunch1After3(int x, double y, float z, String str, int q)
+ {
+ return x + (int) y + (int) z + q;
+ }
+
+ public int bunch1After5(int x, double y, float z, String str, int q)
+ {
+ return x + (int) y + (int) z + q;
+ }
+
+ /* bunch2(int, double, float, int) */
+
+ public int bunch2Before3(int x, double y, float z, int q)
+ {
return x + (int) y * 2 + (int) z + q;
}
- public int bunch3(int x, double y, float z, int q)
+ public int bunch2After1(int x, double y, float z, int q)
{
+ return x + (int) y * 2 + (int) z + q;
+ }
+
+ public int bunch2After2(int x, double y, float z, int q)
+ {
+ return x + (int) y * 2 + (int) z + q;
+ }
+
+ public int bunch2After3(int x, double y, float z, int q)
+ {
+ return x + (int) y * 2 + (int) z + q;
+ }
+
+ public int bunch2After5(int x, double y, float z, int q)
+ {
+ return x + (int) y * 2 + (int) z + q;
+ }
+
+ /* bunch3(int, double, float, int) */
+
+ public int bunch3Before3(int x, double y, float z, int q)
+ {
return x + (int) y * 3 + (int) z + q;
}
- public int bunch4(int x, double y, float z, int q)
+ public int bunch3After1(int x, double y, float z, int q)
{
+ return x + (int) y * 3 + (int) z + q;
+ }
+
+ public int bunch3After2(int x, double y, float z, int q)
+ {
+ return x + (int) y * 3 + (int) z + q;
+ }
+
+ public int bunch3After3(int x, double y, float z, int q)
+ {
+ return x + (int) y * 3 + (int) z + q;
+ }
+
+ public int bunch3After5(int x, double y, float z, int q)
+ {
+ return x + (int) y * 3 + (int) z + q;
+ }
+
+ /* bunch4(int, double, float, int) */
+
+ public int bunch4Before3(int x, double y, float z, int q)
+ {
return x + (int) y * 4 + (int) z + q;
}
- public int bunch5(int x, double y, float z, int q)
+ /* bunch5(int, double, float, int) */
+
+ public int bunch5Before3(int x, double y, float z, int q)
{
return x + (int) y * 5 + (int) z + q;
}
- public int bunch6(int x, double y, float z, int q)
+ /* bunch6(int, double, float, int) */
+
+ public int bunch6After1(int x, double y, float z, int q)
{
return x + (int) y * 6 + (int) z + q;
}
- public int bunch7(int x, double y, float z, int q)
+ public int bunch6After2(int x, double y, float z, int q)
{
+ return x + (int) y * 6 + (int) z + q;
+ }
+
+ public int bunch6After3(int x, double y, float z, int q)
+ {
+ return x + (int) y * 6 + (int) z + q;
+ }
+
+ public int bunch6After5(int x, double y, float z, int q)
+ {
+ return x + (int) y * 6 + (int) z + q;
+ }
+
+ /* bunch7(int, double, float, int) */
+
+ public int bunch7After1(int x, double y, float z, int q)
+ {
return x + (int) y * 7 + (int) z + q;
}
- public int bunch8(int x, double y, float z, int q)
+ public int bunch7After2(int x, double y, float z, int q)
{
+ return x + (int) y * 7 + (int) z + q;
+ }
+
+ public int bunch7After3(int x, double y, float z, int q)
+ {
+ return x + (int) y * 7 + (int) z + q;
+ }
+
+ public int bunch7After5(int x, double y, float z, int q)
+ {
+ return x + (int) y * 7 + (int) z + q;
+ }
+
+ /* bunch8(int, double, float, int) */
+
+ public int bunch8After1(int x, double y, float z, int q)
+ {
return x + (int) y * 8 + (int) z + q;
}
- public int bunch9(int x, double y, float z, int q)
+ public int bunch8After2(int x, double y, float z, int q)
{
+ return x + (int) y * 8 + (int) z + q;
+ }
+
+ public int bunch8After3(int x, double y, float z, int q)
+ {
+ return x + (int) y * 8 + (int) z + q;
+ }
+
+ public int bunch8After5(int x, double y, float z, int q)
+ {
+ return x + (int) y * 8 + (int) z + q;
+ }
+
+ /* bunch9(int, double, float, int) */
+
+ public int bunch9After1(int x, double y, float z, int q)
+ {
return x + (int) y * 9 + (int) z + q;
}
- public void method2(String param1, int param2, boolean param3, ArgsPOJO[] param4)
+ public int bunch9After2(int x, double y, float z, int q)
+ {
+ return x + (int) y * 9 + (int) z + q;
+ }
+
+ public int bunch9After3(int x, double y, float z, int q)
+ {
+ return x + (int) y * 9 + (int) z + q;
+ }
+
+ public int bunch9After5(int x, double y, float z, int q)
+ {
+ return x + (int) y * 9 + (int) z + q;
+ }
+
+ /* method2(String, int, boolean ArgsPOJO[]) */
+
+ public void method2Finally2(String param1, int param2, boolean param3, ArgsPOJO[] param4)
{}
- public void method4(String param1, int param2, boolean param3, ArgsPOJO[] param4)
+ /* method4(String, int, boolean, ArgsPOJO[]) */
+
+ public void method4Finally2(String param1, int param2, boolean param3, ArgsPOJO[] param4)
{}
- public void method6(short param1, long param2) throws POJOException
+ /* method6(short, long) */
+
+ public void method6Finally2(short param1, long param2) throws POJOException
{
throw new POJOException();
}
- public void method8() throws POJOException
+ /* method8() */
+
+ public void method8Finally2() throws POJOException
{
- this.method6((short) -4, (long) 4);
+ this.method6Finally2((short) -4, (long) 4);
}
- public void method9(Interface param) throws POJOException {}
+ /* method9(Interface) */
- public void method10(Interface param) throws POJOException
+ public void method9Before4(Interface param) throws POJOException {}
+
+ public void method9Before5(Interface param) throws POJOException {}
+
+ public void method9Around4(Interface param) throws POJOException {}
+
+ public void method9Around5(Interface param) throws POJOException {}
+
+ public void method9After4(Interface param) throws POJOException {}
+
+ public void method9After5(Interface param) throws POJOException {}
+
+ public void method9Throwing4(Interface param) throws POJOException {}
+
+ public void method9Throwing5(Interface param) throws POJOException {}
+
+ public void method9Finally4(Interface param) throws POJOException {}
+
+ public void method9Finally5(Interface param) throws POJOException {}
+
+ /* method10(Interface) */
+
+ public void method10Before4(Interface param) throws POJOException
{
throw new POJOException();
}
- public void method11(String param1, Collection param2) {}
+ public void method10Before5(Interface param) throws POJOException
+ {
+ throw new POJOException();
+ }
- public void method12(String param1, Collection param2) throws POJOException
+ public void method10Around4(Interface param) throws POJOException
{
throw new POJOException();
}
- public void method13(List<SuperValue> arg) {}
+ public void method10Around5(Interface param) throws POJOException
+ {
+ throw new POJOException();
+ }
- public void method14(List<SuperValue> arg) throws POJOException
+ public void method10After4(Interface param) throws POJOException
{
throw new POJOException();
}
+
+ public void method10After5(Interface param) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method10Throwing4(Interface param) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method10Throwing5(Interface param) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method10Finally4(Interface param) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method10Finally5(Interface param) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ /* method11(String, Collection) */
+
+ public void method11Before2(String param1, Collection param2) {}
+
+ public void method11Around2(String param1, Collection param2) {}
+
+ public void method11After2(String param1, Collection param2) {}
+
+ public void method11Throwing2(String param1, Collection param2) {}
+
+ public void method11Finally2(String param1, Collection param2) {}
+
+ /* method12(String, Collection) */
+
+ public void method12Before2(String param1, Collection param2) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method12Around2(String param1, Collection param2) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method12After2(String param1, Collection param2) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method12Throwing2(String param1, Collection param2) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method12Finally2(String param1, Collection param2) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ /* method13(List<SuperValue>) */
+
+ public void method13Before7(List<SuperValue> arg) {}
+
+ public void method13Before8(List<SuperValue> arg) {}
+
+ public void method13Around5(List<SuperValue> arg) {}
+
+ public void method13Around7(List<SuperValue> arg) {}
+
+ public void method13Around8(List<SuperValue> arg) {}
+
+ public void method13After5(List<SuperValue> arg) {}
+
+ public void method13After7(List<SuperValue> arg) {}
+
+ public void method13After8(List<SuperValue> arg) {}
+
+ public void method13Throwing2(List<SuperValue> arg) {}
+
+ public void method13Throwing7(List<SuperValue> arg) {}
+
+ public void method13Throwing8(List<SuperValue> arg) {}
+
+ public void method13Finally5(List<SuperValue> arg) {}
+
+ public void method13Finally7(List<SuperValue> arg) {}
+
+ public void method13Finally8(List<SuperValue> arg) {}
+
+ /* method14(List<SuperValue>) */
+
+ public void method14Before7(List<SuperValue> arg) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method14Before8(List<SuperValue> arg) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method14Around5(List<SuperValue> arg) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method14Around7(List<SuperValue> arg) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method14Around8(List<SuperValue> arg) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method14After5(List<SuperValue> arg) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method14After7(List<SuperValue> arg) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method14After8(List<SuperValue> arg) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method14Throwing2(List<SuperValue> arg) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method14Throwing7(List<SuperValue> arg) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method14Throwing8(List<SuperValue> arg) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method14Finally5(List<SuperValue> arg) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method14Finally7(List<SuperValue> arg) throws POJOException
+ {
+ throw new POJOException();
+ }
+
+ public void method14Finally8(List<SuperValue> arg) throws POJOException
+ {
+ throw new POJOException();
+ }
}
\ No newline at end of file
Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs/ArgsInvalidTestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs/ArgsInvalidTestCase.java (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs/ArgsInvalidTestCase.java 2007-08-21 16:51:37 UTC (rev 64745)
@@ -0,0 +1,337 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.beforeafterArgs;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+import org.jboss.aop.advice.NoMatchingAdviceException;
+import org.jboss.test.aop.AOPTestWithSetup;
+
+/**
+ * Tests the use of @Args parameters with invalid advices.
+ *
+ * @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ */
+public class ArgsInvalidTestCase extends AOPTestWithSetup
+{
+ private ArgsInvalidPOJO pojo;
+
+ public static void main(String[] args)
+ {
+ TestRunner.run(suite());
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("ArgsTestCase");
+ suite.addTestSuite(ArgsInvalidTestCase.class);
+ return suite;
+ }
+
+ public ArgsInvalidTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ this.pojo = new ArgsInvalidPOJO();
+ ArgsAspect.clear();
+ }
+
+ public void test1()
+ {
+ Object text = null;
+ boolean thrown = false;
+ try
+ {
+ text = pojo.field1Before4;
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ text = pojo.field1Before5;
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test2()
+ {
+ boolean thrown = false;
+ try
+ {
+ pojo.field1Before4 = "test2";
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.field1Before5 = "test2";
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test3()
+ {
+ boolean thrown = false;
+ try
+ {
+ pojo.field2NonexistentAdvice = "test3";
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.field2Finally2= "test3";
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test4()
+ {
+ boolean thrown = false;
+ try
+ {
+ pojo.field3After4 = 10;
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ pojo.field3After5 = 10;
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test5()
+ {
+ boolean result = false;
+
+ boolean thrown = false;
+ try
+ {
+ result = ArgsInvalidPOJO.field4Before4 && true;
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ result = ArgsInvalidPOJO.field4Before5 && true;
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ result = ArgsInvalidPOJO.field4After4 && true;
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ result = ArgsInvalidPOJO.field4After5 && true;
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ result = ArgsInvalidPOJO.field4Finally2 && true;
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test6()
+ {
+ boolean thrown = false;
+ try
+ {
+ ArgsInvalidPOJO.field4Before4 = false;
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ ArgsInvalidPOJO.field4Before5 = false;
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ ArgsInvalidPOJO.field4After4 = false;
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ ArgsInvalidPOJO.field4After5 = false;
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+
+ thrown = false;
+ try
+ {
+ ArgsInvalidPOJO.field4Finally2 = false;
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test7()
+ {
+ boolean thrown = false;
+ try
+ {
+ pojo.method2Finally2("test8", 8, true, null);
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test8()
+ {
+ boolean thrown = false;
+ try
+ {
+ pojo.method4Finally2("test10", 0, false, null);
+ }
+ catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test9() throws POJOException
+ {
+ boolean thrown = false;
+ try
+ {
+ pojo.method6Finally2((short) 5, 112);
+ }
+ catch(NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+
+ public void test10() throws POJOException
+ {
+ boolean thrown = false;
+ try
+ {
+ pojo.method8Finally2();
+ } catch (NoMatchingAdviceException e)
+ {
+ thrown = true;
+ }
+ assertTrue(thrown);
+ }
+}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list