Revise boolean attribute methods to handle defaults.
[shibboleth/cpp-opensaml.git] / samltest / saml2 / core / impl / NameIDPolicy20Test.h
index 27418c2..ac4e292 100644 (file)
@@ -47,7 +47,7 @@ public:
         auto_ptr<XMLObject> xo(unmarshallElement(singleElementFile));\r
         NameIDPolicy* policy = dynamic_cast<NameIDPolicy*>(xo.get());\r
         TS_ASSERT(policy!=NULL);\r
-        TSM_ASSERT_EQUALS("AllowCreate attribute presence", false, policy->AllowCreate().first);\r
+        TSM_ASSERT_EQUALS("AllowCreate attribute presence", XMLConstants::XML_BOOL_NULL, policy->getAllowCreate());\r
     }\r
 \r
     void testSingleElementOptionalAttributesUnmarshall() {\r
@@ -56,8 +56,8 @@ public:
         TS_ASSERT(policy!=NULL);\r
         assertEquals("Format attribute", expectedFormat, policy->getFormat());\r
         assertEquals("SPNameQualifier attribute", expectedSPNameQualifier, policy->getSPNameQualifier());\r
-        TSM_ASSERT_EQUALS("AllowCreate attribute presence", true, policy->AllowCreate().first);\r
-        TSM_ASSERT_EQUALS("AllowCreate attribute value", expectedAllowCreate, policy->AllowCreate().second);\r
+        TSM_ASSERT_DIFFERS("AllowCreate attribute presence", XMLConstants::XML_BOOL_NULL, policy->getAllowCreate());\r
+        TSM_ASSERT_EQUALS("AllowCreate attribute value", expectedAllowCreate, policy->AllowCreate());\r
     }\r
 \r
     void testSingleElementMarshall() {\r