[Contestj-developer] contestj/contestj2/src/test/conf/backport/test test-backport-aop.xml, NONE, 1.
Status: Inactive
Brought to you by:
thomasra
|
From: Ståle P. <st...@us...> - 2007-06-20 14:54:18
|
Update of /cvsroot/contestj/contestj/contestj2/src/test/conf/backport/test In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14426/contestj2/src/test/conf/backport/test Added Files: test-backport-aop.xml Log Message: Initial upload of Contestj2 even though it supports most of the Contestj features its not ready to be used atm. --- NEW FILE: test-backport-aop.xml --- <?xml version="1.0" encoding="UTF-8"?> <aop> <!-- All classes thats fully mocked must be described like this. The only thing that need to be changed from class to class is class="path.to.class.and.classname" --> <!-- <introduction class="org.contestj.test.mock.clazz.Bar"> <mixin> <interfaces> org.contestj.introduction.Mock </interfaces> <class> org.contestj.introduction.MockImpl </class> <construction> new org.contestj.introduction.MockImpl(this) </construction> </mixin> </introduction> --> <!-- add this for each class thats fully mocked, change the name for each class --> <!-- <pointcut name="bar" expr="execution(public * org.contestj.test.mock.clazz.Bar->*(..))"/> --> <!-- do not touch --> <!-- <pointcut name="mockMethods" expr="execution(public * *->getReturnObject(..))"/> <pointcut name="mockMethods2" expr="execution(public * *->setupMock(..))"/> <pointcut name="mockMethods3" expr="execution(public * *->setupVoidMock(..))"/> --> <!-- for each fully mocked class you must add the pointcut to the end here. leave (!mockMethods AND !mockMethods2 AND !mockMethods3) be as they are --> <!-- <bind pointcut="(!mockMethods AND !mockMethods2 AND !mockMethods3) AND bar"> <interceptor class="org.contestj.interceptor.MockInterceptor"/> </bind> --> <!-- for each method thats mocked, add a line similar to this --> <bind pointcut="execution(public * org.contestj.test.backport.test.TestFactory->getTestInterfaceImplementation())"> <interceptor class="org.contestj.interceptor.MockMethodInterceptor"/> </bind> <bind pointcut="execution(* org.contestj.test.backport.test.Test->doStuff())"> <interceptor class="org.contestj.interceptor.MockMethodInterceptor"/> </bind> <bind pointcut="execution(* org.contestj.test.backport.test.Test->doInvocationStuff(java.lang.String))"> <interceptor class="org.contestj.interceptor.MockMethodInterceptor"/> </bind> <bind pointcut="execution(static * org.contestj.test.backport.test.Test->doStaticStuff())"> <interceptor class="org.contestj.interceptor.MockMethodInterceptor"/> </bind> <!-- BaseClass Mocking --> <!-- All classes thats fully mocked must be described like this. The only thing that need to be changed from class to class is class="path.to.class.and.classname" --> <introduction class="org.contestj.test.backport.example.BaseClass"> <mixin> <interfaces> org.contestj.introduction.Mock </interfaces> <class> org.contestj.introduction.MockImpl </class> <construction> new org.contestj.introduction.MockImpl(this) </construction> </mixin> </introduction> <!-- add this for each class thats fully mocked, change the name for each class --> <pointcut name="baseclass" expr="execution(public * org.contestj.test.backport.example.BaseClass->getValue())"/> <!-- do not touch --> <pointcut name="mockMethods" expr="execution(public * *->getReturnObject(..))"/> <pointcut name="mockMethods2" expr="execution(public * *->setupMock(..))"/> <pointcut name="mockMethods3" expr="execution(public * *->setupVoidMock(..))"/> <!-- for each fully mocked class you must add the pointcut to the end here. leave (!mockMethods AND !mockMethods2 AND !mockMethods3) be as they are --> <bind pointcut="(!mockMethods AND !mockMethods2 AND !mockMethods3) AND baseclass"> <interceptor class="org.contestj.interceptor.MockInterceptor"/> </bind> <!-- Java5BaseClass Mocking --> <!-- All classes thats fully mocked must be described like this. The only thing that need to be changed from class to class is class="path.to.class.and.classname" --> <introduction class="org.contestj.test.backport.example.Java5BaseClass"> <mixin> <interfaces> org.contestj.introduction.Mock </interfaces> <class> org.contestj.introduction.MockImpl </class> <construction> new org.contestj.introduction.MockImpl(this) </construction> </mixin> </introduction> <!-- add this for each class thats fully mocked, change the name for each class --> <pointcut name="java5baseclass" expr="execution(public * org.contestj.test.backport.example.Java5BaseClass->getValue())"/> <!-- do not touch --> <pointcut name="mockMethods" expr="execution(public * *->getReturnObject(..))"/> <pointcut name="mockMethods2" expr="execution(public * *->setupMock(..))"/> <pointcut name="mockMethods3" expr="execution(public * *->setupVoidMock(..))"/> <!-- for each fully mocked class you must add the pointcut to the end here. leave (!mockMethods AND !mockMethods2 AND !mockMethods3) be as they are --> <bind pointcut="(!mockMethods AND !mockMethods2 AND !mockMethods3) AND java5baseclass"> <interceptor class="org.contestj.interceptor.MockInterceptor"/> </bind> </aop> |