chLatin_E, chLatin_l, chLatin_e, chLatin_m, chLatin_e, chLatin_n, chLatin_t, chNull\r
};\r
\r
+const XMLCh SimpleXMLObject::DERIVED_NAME[] = {\r
+ chLatin_D, chLatin_e, chLatin_r, chLatin_i, chLatin_v, chLatin_e, chLatin_d,\r
+ chLatin_E, chLatin_l, chLatin_e, chLatin_m, chLatin_e, chLatin_n, chLatin_t, chNull\r
+};\r
+\r
+const XMLCh SimpleXMLObject::TYPE_NAME[] = {\r
+ chLatin_S, chLatin_i, chLatin_m, chLatin_p, chLatin_l, chLatin_e,\r
+ chLatin_E, chLatin_l, chLatin_e, chLatin_m, chLatin_e, chLatin_n, chLatin_t, \r
+ chLatin_T, chLatin_y, chLatin_p, chLatin_e, chNull\r
+};\r
+\r
const XMLCh SimpleXMLObject::ID_ATTRIB_NAME[] = {\r
chLatin_I, chLatin_d, chNull\r
};\r
\r
class UnmarshallingTest : public CxxTest::TestSuite {\r
QName m_qname;\r
+ QName m_qtype;\r
public:\r
- UnmarshallingTest() : m_qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME) {}\r
+ UnmarshallingTest() : m_qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME,SimpleXMLObject::NAMESPACE_PREFIX),\r
+ m_qtype(SimpleXMLObject::NAMESPACE,SimpleXMLObject::TYPE_NAME,SimpleXMLObject::NAMESPACE_PREFIX) {}\r
\r
void setUp() {\r
XMLObjectBuilder::registerBuilder(m_qname, new SimpleXMLObjectBuilder());\r
+ XMLObjectBuilder::registerBuilder(m_qtype, new SimpleXMLObjectBuilder());\r
}\r
\r
void tearDown() {\r
XMLObjectBuilder::deregisterBuilder(m_qname);\r
+ XMLObjectBuilder::deregisterBuilder(m_qtype);\r
}\r
\r
void testUnmarshallingWithAttributes() {\r
TS_ASSERT(sxObject.get()!=NULL);\r
\r
VectorOf(SimpleXMLObject) kids=sxObject->getSimpleXMLObjects();\r
- TSM_ASSERT_EQUALS("Number of child elements was not expected value", 2, kids.size());\r
+ TSM_ASSERT_EQUALS("Number of child elements was not expected value", 3, kids.size());\r
+ TSM_ASSERT_EQUALS("Child's schema type was not expected value", m_qtype, *(kids.back()->getSchemaType()));\r
}\r
\r
void testUnmarshallingWithUnknownChild() {\r