Cédric,
Yes, indeed I invoked toXml() to get the XML to write to the temporary
file.
Here is the XML, which seems correct:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "
http://testng.org/testng-1.0.dtd">
<suite object-factory="com.mycompany.SingletonObjectFactory" name="My
suite">
<parameter name="alice.lastName" value="Hudson"/>
<parameter name="alice.login" value="alice"/>
<parameter name="alice.firstName" value="Alice"/>
<test name="Location" preserve-order="false">
<classes>
<class name="com.mycompany.Location"/>
</classes>
</test>
<test name="Routing" preserve-order="false">
<classes>
<class name="com.mycompany.Routing"/>
</classes>
</test>
</suite>
XmlSuite.setObjectFactory(IObjectFactory objectFactory) takes an
instance of a class implementing the IObjectFactory interface.
As this factory returns singleton objects, I don't want TestNG to
create a new instance of this factory, but rather provide the unique
instance of the factory to TestNG.
Fab