From: Scott Cantor Date: Thu, 15 Dec 2011 09:27:14 +0000 (+0000) Subject: Switch to vector-based API. X-Git-Tag: 1.5.0~52 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=commitdiff_plain;h=47ba040008729fbf96eeab6beeeef1461df52a6f Switch to vector-based API. --- diff --git a/xmltoolingtest/FilesystemCredentialResolverTest.h b/xmltoolingtest/FilesystemCredentialResolverTest.h index 4b5cf53..365c741 100644 --- a/xmltoolingtest/FilesystemCredentialResolverTest.h +++ b/xmltoolingtest/FilesystemCredentialResolverTest.h @@ -45,11 +45,13 @@ public: ) ); + vector creds; Locker locker(credResolver.get()); - const X509Credential* cred=dynamic_cast(credResolver->resolve()); - TSM_ASSERT("Retrieved credential was null", cred!=nullptr); - TSM_ASSERT("Retrieved key was null", cred->getPrivateKey()!=nullptr); - TSM_ASSERT_EQUALS("Unexpected number of certificates", 1, cred->getEntityCertificateChain().size()); - TSM_ASSERT_EQUALS("Custom key name not found", 1, cred->getKeyNames().count("Sample Key")); + credResolver->resolve(creds); + TSM_ASSERT_EQUALS("Retrieved credential was null", 1, creds.size()); + TSM_ASSERT("Retrieved key was null", creds.front()->getPrivateKey()!=nullptr); + TSM_ASSERT_EQUALS("Unexpected number of certificates", 1, + dynamic_cast(creds.front())->getEntityCertificateChain().size()); + TSM_ASSERT_EQUALS("Custom key name not found", 1, creds.front()->getKeyNames().count("Sample Key")); } };