2 * Copyright (c) 2014 <copyright holder> <email>
4 * For license details, see the LICENSE file in the root of this project.
11 #include "NameCacheTest.h"
12 #include "cache/GSSNameCache.h"
13 #include "datamodel/GSSName.h"
14 #include <GSSImportName.h>
16 CPPUNIT_TEST_SUITE_REGISTRATION( NameCacheTest );
18 void NameCacheTest::setUp()
23 void NameCacheTest::tearDown()
28 void NameCacheTest::testStore()
32 GSSName source( (gss_name_t)rand(), true), target;
41 key = GSSNameCache::instance()->store(source);
43 // verify that the data can be retrieved.
44 target = GSSNameCache::instance()->retrieve(key);
46 CPPUNIT_ASSERT_EQUAL_MESSAGE(
47 "The name cache did not store and retrieve the same data",