This notice is of interest only to those who have been using the pre-release versions of methodinvoker and dynamichandler tags. Certain API level changes were made to these tags, which means that if you have been using the tags from the CVS versions prior to release 3.8 (it was first released in 3.8), you will need to make the following changes to your test specifications.
So a methodinvoker tag which looks like this:
<methodinvoker className="java.lang.String" methodName="startsWith">
..<constructorArgs type="java.lang.String">hello you</constructorArgs>
..<methodArgs type="java.lang.String">hello</methodArgs>
..</methodArgs>
</methodinvoker>
would change to look like this:
<methodinvoker class="java.lang.String" method="startsWith">
..<constructorArgs>
....<arg name="c1" type="java.lang.String" value="hello you" />
..</constructorArgs>
..<methodArgs>
....<arg name="m1" type="java.lang.String" value="hello" />
..</methodArgs>
</methodinvoker>
and a dynamicsql tag that used to look like this:
<dynamicsql className="net.sourceforge.sqlunit.utils.TestArgument" isMethodStatic="true" methodName="getGeneratedOracleSqlString2">
</dynamicsql>
will now change to:
<dynamicsql class="net.sourceforge.sqlunit.utils.TestArgument" static="true" method="getGeneratedOracleSqlString2">
</dynamicsql>
So basically the attributes:
methodName has been renamed to method
className has been renamed to class
isMethodStatic has been renamed to static.
in both the MethodInvoker and DynamicSql tags.
Also the constructorArgs and methodArgs has been changed to being wrapper tags for the arg element. The value attribute of both these tags has been moved from being a text field to being a value attribute in the arg tag.
I realize that this means changing your test cases, and I am sorry to nitpick, but I think the new scheme will be good in terms of conciseness (class instead of className, no loss of meaning there, but less typing) and self-documenting-ness (you are forced to specify the argument name in the arg tag so hopefully that will serve as a mental jog in case things go wrong and you have to debug it - I actually got an identical request for the param tag). It also helps in code reuse, since I can now make the handlers for these tags a wrapper around the ArgHandler.
Please post on this thread if you have any questions. And, no I dont do this a lot, I tend to avoid making changes that are backward incompatible, but this was kind of special, since I knew that there were a very small number of users who were working on this and would be affected, versus a larger number of users who would be impacted in the long run if the changes were not made.
-sujit
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This notice is of interest only to those who have been using the pre-release versions of methodinvoker and dynamichandler tags. Certain API level changes were made to these tags, which means that if you have been using the tags from the CVS versions prior to release 3.8 (it was first released in 3.8), you will need to make the following changes to your test specifications.
So a methodinvoker tag which looks like this:
<methodinvoker className="java.lang.String" methodName="startsWith">
..<constructorArgs type="java.lang.String">hello you</constructorArgs>
..<methodArgs type="java.lang.String">hello</methodArgs>
..</methodArgs>
</methodinvoker>
would change to look like this:
<methodinvoker class="java.lang.String" method="startsWith">
..<constructorArgs>
....<arg name="c1" type="java.lang.String" value="hello you" />
..</constructorArgs>
..<methodArgs>
....<arg name="m1" type="java.lang.String" value="hello" />
..</methodArgs>
</methodinvoker>
and a dynamicsql tag that used to look like this:
<dynamicsql className="net.sourceforge.sqlunit.utils.TestArgument" isMethodStatic="true" methodName="getGeneratedOracleSqlString2">
</dynamicsql>
will now change to:
<dynamicsql class="net.sourceforge.sqlunit.utils.TestArgument" static="true" method="getGeneratedOracleSqlString2">
</dynamicsql>
So basically the attributes:
methodName has been renamed to method
className has been renamed to class
isMethodStatic has been renamed to static.
in both the MethodInvoker and DynamicSql tags.
Also the constructorArgs and methodArgs has been changed to being wrapper tags for the arg element. The value attribute of both these tags has been moved from being a text field to being a value attribute in the arg tag.
I realize that this means changing your test cases, and I am sorry to nitpick, but I think the new scheme will be good in terms of conciseness (class instead of className, no loss of meaning there, but less typing) and self-documenting-ness (you are forced to specify the argument name in the arg tag so hopefully that will serve as a mental jog in case things go wrong and you have to debug it - I actually got an identical request for the param tag). It also helps in code reuse, since I can now make the handlers for these tags a wrapper around the ArgHandler.
Please post on this thread if you have any questions. And, no I dont do this a lot, I tend to avoid making changes that are backward incompatible, but this was kind of special, since I knew that there were a very small number of users who were working on this and would be affected, versus a larger number of users who would be impacted in the long run if the changes were not made.
-sujit