Moved ReplayCache into xmltooling
[shibboleth/cpp-opensaml.git] / samltest / ArtifactMapTest.h
index 72a8b2d..8f2aa30 100644 (file)
@@ -16,6 +16,7 @@
 \r
 #include "internal.h"\r
 #include <saml/SAMLConfig.h>\r
+#include "saml/binding/ArtifactMap.h"\r
 #include <saml/saml2/binding/SAML2ArtifactType0004.h>\r
 #include <saml/saml2/core/Protocols.h>\r
 \r
@@ -28,23 +29,20 @@ class ArtifactMapTest : public CxxTest::TestSuite
 public:\r
     string providerIdStr;\r
     string handle;\r
-    ArtifactMap* artifactMap;\r
     void setUp() {\r
         if (handle.empty()) {\r
             providerIdStr = "https://idp.org/SAML";\r
             SAMLConfig::getConfig().generateRandomBytes(handle,SAML2ArtifactType0004::HANDLE_LENGTH);\r
         }\r
-        artifactMap = new ArtifactMap();\r
     }\r
     void tearDown() {\r
-        delete artifactMap;\r
-        artifactMap=NULL;\r
     }\r
     void testArtifactMap(void) {\r
         auto_ptr<Response> response(ResponseBuilder::buildResponse());\r
 \r
         SAML2ArtifactType0004 artifact(SAMLConfig::getConfig().hashSHA1(providerIdStr.c_str()),666,handle);\r
-\r
+        \r
+        ArtifactMap* artifactMap = SAMLConfig::getConfig().getArtifactMap();\r
         artifactMap->storeContent(response.get(), &artifact, providerIdStr.c_str());\r
         response.release();\r
 \r