X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=xmltoolingtest%2FFilesystemCredentialResolverTest.h;h=7f2816b5ab951cda1a99ddf4c7075437031227d8;hb=dce8d2e1bee9a4d375a1d51e1404f1b7a060e5d9;hp=92e720a874638057b809810deef536112d8886e4;hpb=2ac7def6897c8b8c5029c18346514f316f6b37dc;p=shibboleth%2Fxmltooling.git diff --git a/xmltoolingtest/FilesystemCredentialResolverTest.h b/xmltoolingtest/FilesystemCredentialResolverTest.h index 92e720a..7f2816b 100644 --- a/xmltoolingtest/FilesystemCredentialResolverTest.h +++ b/xmltoolingtest/FilesystemCredentialResolverTest.h @@ -1,48 +1,48 @@ -/* - * Copyright 2001-2006 Internet2 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "XMLObjectBaseTestCase.h" - -#include - -#include - -class FilesystemCredentialResolverTest : public CxxTest::TestSuite { -public: - void setUp() { - } - - void tearDown() { - } - - void testFilesystemProvider() { - string config = data_path + "FilesystemCredentialResolver.xml"; - ifstream in(config.c_str()); - DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in); - XercesJanitor janitor(doc); - - auto_ptr credResolver( - XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin( - FILESYSTEM_CREDENTIAL_RESOLVER,doc->getDocumentElement() - ) - ); - - Locker locker(credResolver.get()); - auto_ptr key(credResolver->getKey()); - TSM_ASSERT("Retrieved key was null", key.get()!=NULL); - TSM_ASSERT_EQUALS("Unexpected number of certificates", 1, credResolver->getCertificates().size()); - } -}; +/* + * Copyright 2001-2006 Internet2 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "XMLObjectBaseTestCase.h" + +#include + +#include + +class FilesystemCredentialResolverTest : public CxxTest::TestSuite { +public: + void setUp() { + } + + void tearDown() { + } + + void testFilesystemProvider() { + string config = data_path + "FilesystemCredentialResolver.xml"; + ifstream in(config.c_str()); + DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in); + XercesJanitor janitor(doc); + + auto_ptr credResolver( + XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin( + FILESYSTEM_CREDENTIAL_RESOLVER,doc->getDocumentElement() + ) + ); + + Locker locker(credResolver.get()); + auto_ptr key(credResolver->getKey()); + TSM_ASSERT("Retrieved key was null", key.get()!=NULL); + TSM_ASSERT_EQUALS("Unexpected number of certificates", 1, credResolver->getCertificates().size()); + } +};