What steps will reproduce the problem?
1.Create a CFC like this:
<cfcomponent>
<cffunction name="foo">
<cfargument name="bar" required="false" default="&">
<!--- implementation here --->
</cffunction>
</cfcomponent>
2. Ask the generator to create a test stub for the component
What is the expected output? What do you see instead?
You'd expect the test to be generated.
What you see is an error:
An error occured while Parsing an XML document.
The entity name must immediately follow the '&' in the entity reference.
\mxunit\generator\generate.cfm: line 54
What version of the product are you using? On what operating system?
Using
Please provide any additional information below.
The error is caused because the generator is not escaping the ampersand in
the default attribute of the method's argument.
Changing line 54 from this:
default="#md.functions[method].parameters[argument].default#"
to this:
default="#XMLFormat(md.functions[method].parameters[argument].default)#"
sorted it for me.
Looking at the code, I think this is the only attribute of a CFC and it's
arguments that could be affected, unless you can name a method with an
ampersand?