[Contestj-developer] contestj/contestj2/src/test/conf/subclass subclass-aop.xml, NONE, 1.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/subclass In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14426/contestj2/src/test/conf/subclass Added Files: subclass-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: subclass-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.subclass.SubPOJO"> <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="subpojo" expr="execution(public * org.contestj.test.mock.subclass.SubPOJO->*(..))"/> <pointcut name="pojo" expr="execution(public * org.contestj.test.mock.subclass.POJO->*(..))"/> <!-- do not touch --> <pointcut name="mockMethods" expr="execution(public * *->getReturnObject(..))"/> <pointcut name="mockMethods2" expr="execution(public * *->setupMock(..))"/> <!-- for each fully mocked class you must add the pointcut to the end here. leave mockMethods and mockMethods2 be --> <bind pointcut="!mockMethods AND !mockMethods2 AND (subpojo OR pojo)"> <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.mock.subclass.Tester->getSubPOJO())"> <interceptor class="org.contestj.interceptor.MockMethodInterceptor"/> </bind> </aop> |