From: Manish A. <mag...@us...> - 2007-01-10 07:19:53
|
User: magrawal Date: 07/01/09 23:19:54 Modified: andromda-nspring/src/main/resources/templates/nspring NSpringServiceTestBase.vsl NSpringServiceTestImpl.vsl Log: modified the test templates to generate unique names for test cases for overloaded methods and modified the corresponding unit tests. Revision Changes Path 1.2 +9 -7 cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringServiceTestBase.vsl Index: NSpringServiceTestBase.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringServiceTestBase.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- NSpringServiceTestBase.vsl 9 Jan 2007 10:47:19 -0000 1.1 +++ NSpringServiceTestBase.vsl 10 Jan 2007 07:19:54 -0000 1.2 @@ -20,7 +20,7 @@ /// Spring Service test base class for <code>$service.fullyQualifiedName</code>, /// </p> /// - /// @see $service.fullyQualifiedNameTests + /// @see ${service.fullyQualifiedName}Tests /// </summary> public abstract class ${service.name}Tests { @@ -84,23 +84,25 @@ protected abstract void HandleTearDown(); #endregion - +#set($counter=1) #foreach ($operation in $service.operations) + /// <summary> - /// @see ${service.fullyQualifiedName}Tests#Test${operation.name} + /// @see ${service.fullyQualifiedName}Tests#TC${counter}_${operation.name} /// </summary> [Test] - public void Test${operation.name}() + public void TC${counter}_${operation.name}() { - HandleTest${operation.name}(); + HandleTC${counter}_${operation.name}(); } /// <summary> - /// Performs the core logic for {@link #Test${operation.name}()} + /// Performs the core logic for {@link #TC${counter}_${operation.name}()} /// <summary> - protected abstract void HandleTest${operation.name}(); + protected abstract void HandleTC${counter}_${operation.name}(); + #set($counter= $counter + 1) #end } #if ($stringUtils.isNotBlank($service.packageName)) 1.2 +5 -5 cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringServiceTestImpl.vsl Index: NSpringServiceTestImpl.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-nspring/src/main/resources/templates/nspring/NSpringServiceTestImpl.vsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- NSpringServiceTestImpl.vsl 9 Jan 2007 10:47:19 -0000 1.1 +++ NSpringServiceTestImpl.vsl 10 Jan 2007 07:19:54 -0000 1.2 @@ -47,17 +47,17 @@ //TODO: put any testcase teardown code here. } #endregion - +#set($counter=1) #foreach ($operation in $service.operations) /// <summary> - /// @see ${service.fullyQualifiedName}Tests#HandleTest${operation.name} + /// @see ${service.fullyQualifiedName}Tests#HandleTC${counter}_${operation.name} /// </summary> - protected override void HandleTest${operation.name}() + protected override void HandleTC${counter}_${operation.name}() { // put your implementation here - throw new Exception("${service.packageName}.Tests.${service.name}TestsImpl.HandleTest${operation.name} is not implemented."); + throw new Exception("${service.packageName}.Tests.${service.name}TestsImpl.HandleTC${counter}_${operation.name} is not implemented."); } - +#set($counter= $counter + 1) #end } #if ($stringUtils.isNotBlank($service.packageName)) |