* Additionally, tests transformation arguments.
* Tests using the service TestTransform.
*/
public void testTransformFormatPrimitive()
{
Metaclass serviceClass = m_metadata.getMetaclass(Metadata.SERVICE_CLASS_NAME);
Message csvMessage = m_metadata.getMessage("CSVTestSuiteResult");
MessageFormatter formatter = (MessageFormatter)csvMessage.getFormat().getFormatter().getInstance(m_context);
TransferObject root, test, testData, result;
List testList;
StringWriter writer;
WriterOutput out;
root = new TransferObject("XMLTestSuiteResult");
testList = new ArrayList(2);
root.setValue("tests", testList);
test = new TransferObject();
testList.add(test);
test.setValue("date", Primitive.toTimestamp("2009-12-07T08:00:00"));
test.setValue("status", "ERROR");
testData = new TransferObject("XMLTestResult", 3);
test.setValue("data", testData);
testData.setValue("seed", "12345");
testData.setValue("a", "aValue");
testData.setValue("b", "bValue");
test = new TransferObject();
testList.add(test);
test.setValue("date", Primitive.toTimestamp("2009-08-17T00:00:00"));
test.setValue("status", "PASS");
testData = new TransferObject("XMLTestResult", 3);
test.setValue("data", testData);
testData.setValue("b", "bValue2");
Instance instance = (Instance)serviceClass.invoke("invoke", new Object[]{"TestTransform", root, null, "PRE-", Boolean.TRUE});
assertEquals(Boolean.TRUE, instance.invoke("done"));
result = (TransferObject)instance.invoke("result");
assertEquals("CSVTestSuiteResult", result.getClassName());