X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltoolingtest%2FUnmarshallingTest.h;h=b29eea76c780c7432ba3e58d04dc4192e6d6fc48;hb=4a4b8fd387a7c03b4ea3d052104c8ca70ceb4a35;hp=43c273539e6603521532506a6b1cd83af2f9310b;hpb=208033c53430f82706ddf5f411747230d8da70da;p=shibboleth%2Fcpp-xmltooling.git diff --git a/xmltoolingtest/UnmarshallingTest.h b/xmltoolingtest/UnmarshallingTest.h index 43c2735..b29eea7 100644 --- a/xmltoolingtest/UnmarshallingTest.h +++ b/xmltoolingtest/UnmarshallingTest.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2010 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -72,15 +72,15 @@ public: string path=data_path + "SimpleXMLObjectWithAttribute.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); - TS_ASSERT(doc!=NULL); + TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); - TS_ASSERT(b!=NULL); + TS_ASSERT(b!=nullptr); auto_ptr sxObject( dynamic_cast(b->buildFromDocument(doc)) ); - TS_ASSERT(sxObject.get()!=NULL); + TS_ASSERT(sxObject.get()!=nullptr); auto_ptr_XMLCh expected("Firefly"); TSM_ASSERT("ID was not expected value", XMLString::equals(expected.get(), sxObject->getId())); @@ -90,15 +90,15 @@ public: string path=data_path + "SimpleXMLObjectWithContent.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); - TS_ASSERT(doc!=NULL); + TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); - TS_ASSERT(b!=NULL); + TS_ASSERT(b!=nullptr); auto_ptr sxObject( dynamic_cast(b->buildFromDocument(doc)) ); - TS_ASSERT(sxObject.get()!=NULL); + TS_ASSERT(sxObject.get()!=nullptr); auto_ptr_XMLCh expected("Sample Content"); TSM_ASSERT("Element content was not expected value", XMLString::equals(expected.get(), sxObject->getValue())); @@ -108,15 +108,15 @@ public: string path=data_path + "SimpleXMLObjectWithChildren.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); - TS_ASSERT(doc!=NULL); + TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); - TS_ASSERT(b!=NULL); + TS_ASSERT(b!=nullptr); auto_ptr sxObject( dynamic_cast(b->buildFromDocument(doc)) ); - TS_ASSERT(sxObject.get()!=NULL); + TS_ASSERT(sxObject.get()!=nullptr); VectorOf(SimpleXMLObject) kids=sxObject->getSimpleXMLObjects(); TSM_ASSERT_EQUALS("Number of child elements was not expected value", 3, kids.size()); @@ -128,15 +128,15 @@ public: string path=data_path + "SimpleXMLObjectWithChildren.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); - TS_ASSERT(doc!=NULL); + TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); - TS_ASSERT(b!=NULL); + TS_ASSERT(b!=nullptr); auto_ptr sxObject( dynamic_cast(b->buildFromDocument(doc)) ); - TS_ASSERT(sxObject.get()!=NULL); + TS_ASSERT(sxObject.get()!=nullptr); sxObject->releaseThisAndChildrenDOM(); auto_ptr clonedObject(dynamic_cast(sxObject->clone())); @@ -151,10 +151,10 @@ public: string path=data_path + "SimpleXMLObjectWithUnknownChild.xml"; ifstream fs(path.c_str()); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs); - TS_ASSERT(doc!=NULL); + TS_ASSERT(doc!=nullptr); const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement()); - TS_ASSERT(b!=NULL); + TS_ASSERT(b!=nullptr); TS_ASSERT_THROWS(b->buildFromDocument(doc),UnmarshallingException); doc->release();