Added singleton methods on typed builders.
[shibboleth/cpp-xmltooling.git] / xmltoolingtest / MarshallingTest.h
index 8c0314d..55f6f73 100644 (file)
@@ -38,8 +38,7 @@ public:
         TS_TRACE("testMarshallingWithAttributes");\r
 \r
         QName qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME);\r
-        const SimpleXMLObjectBuilder* b=dynamic_cast<const SimpleXMLObjectBuilder*>(XMLObjectBuilder::getBuilder(qname));\r
-        auto_ptr<SimpleXMLObject> sxObject(b->buildObject());\r
+        auto_ptr<SimpleXMLObject> sxObject(SimpleXMLObjectBuilder::newSimpleXMLObject());\r
         TS_ASSERT(sxObject.get()!=NULL);\r
         auto_ptr_XMLCh expected("Firefly");\r
         sxObject->setId(expected.get());\r
@@ -59,8 +58,7 @@ public:
         TS_TRACE("testMarshallingWithElementContent");\r
 \r
         QName qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME);\r
-        const SimpleXMLObjectBuilder* b=dynamic_cast<const SimpleXMLObjectBuilder*>(XMLObjectBuilder::getBuilder(qname));\r
-        auto_ptr<SimpleXMLObject> sxObject(b->buildObject());\r
+        auto_ptr<SimpleXMLObject> sxObject(SimpleXMLObjectBuilder::newSimpleXMLObject());\r
         TS_ASSERT(sxObject.get()!=NULL);\r
         auto_ptr_XMLCh expected("Sample Content");\r
         sxObject->setValue(expected.get());\r