From 47ba040008729fbf96eeab6beeeef1461df52a6f Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Thu, 15 Dec 2011 09:27:14 +0000 Subject: [PATCH] Switch to vector-based API. --- xmltoolingtest/FilesystemCredentialResolverTest.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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")); } }; -- 2.1.4