X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltoolingtest%2FFilesystemCredentialResolverTest.h;h=365c741cb281be299275f4134e4d5f20c8e14e62;hb=80753d1cceda431c629b623897df3aa74b4ff930;hp=4b5cf53746a0de3e9b6cd16cd365e61b19ebde89;hpb=3e57847785f2aba70aa6573c7d8c8d7247e28cf9;p=shibboleth%2Fcpp-xmltooling.git 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")); } };