From: Manish A. <mag...@us...> - 2007-01-09 10:46:11
|
User: magrawal Date: 07/01/09 02:46:12 Modified: andromda-nspring/src/main/resources/META-INF/andromda cartridge.xml namespace.xml Log: added templates to generate simple test cases for each public method in the service layer. Revision Changes Path 1.5 +31 -3 cartridges/andromda-nspring/src/main/resources/META-INF/andromda/cartridge.xml Index: cartridge.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/main/resources/META-INF/andromda/cartridge.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -r1.4 -r1.5 --- cartridge.xml 2 Oct 2006 01:21:47 -0000 1.4 +++ cartridge.xml 9 Jan 2007 10:46:11 -0000 1.5 @@ -9,10 +9,11 @@ <templateObject name="springUtils" className="org.andromda.cartridges.nspring.SpringUtils"/> <templateObject name="escapeUtils" className="org.apache.commons.lang.StringEscapeUtils"/> <templateObject name="hibernateUtils" className="org.andromda.cartridges.nspring.SpringHibernateUtils"> + <property reference="hibernateVersion"/> </templateObject> <!-- cartridge-templateObject merge-point--> - +<property reference="createTests"/> <property reference="driver"/> <property reference="username"/> <property reference="password"/> @@ -100,6 +101,33 @@ <!-- cartridge-property merge-point --> <!-- cartridge-resource merge-point --> + + + <template + path="templates/nspring/NSpringServiceTestBase.vsl" + outputPattern="$generatedFile" + outlet="service-tests" + overwrite="true"> + <modelElements variable="service"> + <modelElement> + <type name="org.andromda.cartridges.nspring.metafacades.SpringService"> + </type> + </modelElement> + </modelElements> + </template> + + <template + path="templates/nspring/NSpringServiceTestImpl.vsl" + outputPattern="$generatedFile" + outlet="service-test-impls" + overwrite="false"> + <modelElements variable="service"> + <modelElement> + <type name="org.andromda.cartridges.nspring.metafacades.SpringService"> + </type> + </modelElement> + </modelElements> + </template> <template path="templates/nspring/NSpringDaoFactory.vsl" outputPattern="$generatedFile" 1.3 +17 -1 cartridges/andromda-nspring/src/main/resources/META-INF/andromda/namespace.xml Index: namespace.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/main/resources/META-INF/andromda/namespace.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -r1.2 -r1.3 --- namespace.xml 15 Jun 2006 14:59:55 -0000 1.2 +++ namespace.xml 9 Jan 2007 10:46:11 -0000 1.3 @@ -18,6 +18,19 @@ <documentation> Defines the locations to which output is generated. </documentation> + <property name="service-tests"> + <documentation> + The location to which all service test classes + will be generated. + </documentation> + </property> + <property name="service-test-impls"> + <documentation> + The location to which all service test implementation classes + will be generated. + </documentation> + </property> + <property name="services"> <documentation> The location to which all service classes (including the service locator(s)) @@ -87,6 +100,9 @@ </property> </propertyGroup> <propertyGroup name="Other"> + <property name="createTests" required="false"> + <default>false</default> + </property> <property name="webServiceOutgoingAttachmentHandlerCallPattern" required="false"> <documentation> The pattern to use when constructing the call to the attachment handler (used for sending |