[asterisk-scf-commits] asterisk-scf/integration/ice-util-cpp.git branch "move-bridge-util-functions" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Wed Apr 27 13:35:07 CDT 2011
branch "move-bridge-util-functions" has been updated
via 525cfa3d0fe82d96b735223a365519e0591156ba (commit)
from ac5cf0b1e54e43fa677af49c08a8d75067cff116 (commit)
Summary of changes:
.../LocatorRegistrationTest.cpp | 701 ++++++++++++++++++++
.../LocatorRegistrationTest.h} | 13 +-
2 files changed, 709 insertions(+), 5 deletions(-)
create mode 100644 test/LocatorRegistration/LocatorRegistrationTest.cpp
copy test/{ProxyHelper/ProxyHelperTests.h => LocatorRegistration/LocatorRegistrationTest.h} (75%)
- Log -----------------------------------------------------------------
commit 525cfa3d0fe82d96b735223a365519e0591156ba
Author: Brent Eagles <beagles at digium.com>
Date: Wed Apr 27 16:04:56 2011 -0230
Add missing files.
diff --git a/test/LocatorRegistration/LocatorRegistrationTest.cpp b/test/LocatorRegistration/LocatorRegistrationTest.cpp
new file mode 100644
index 0000000..56c264e
--- /dev/null
+++ b/test/LocatorRegistration/LocatorRegistrationTest.cpp
@@ -0,0 +1,701 @@
+/*
+ * Asterisk SCF -- An open-source communications framework.
+ *
+ * Copyright (C) 2010-2011, Digium, Inc.
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk SCF project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE.txt file
+ * at the top of the source tree.
+ */
+#pragma once
+
+#include <Ice/Ice.h>
+#include <IceBox/IceBox.h>
+#include <IceUtil/Thread.h>
+#include <IceUtil/UUID.h>
+
+#include <AsteriskSCF/LocatorRegistration/LocatorRegistrationWrapper.h>
+#include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
+#include <AsteriskSCF/Core/Discovery/ServiceLocatorEventsIf.h>
+
+#include <boost/test/unit_test.hpp>
+#include <boost/bind.hpp>
+#include <boost/test/debug.hpp>
+
+#include <vector>
+#include <string>
+#include <map>
+#include <AsteriskSCF/Helpers/PropertyHelper.h>
+#include <AsteriskSCF/Helpers/ProxyHelper.h>
+#include <boost/thread/locks.hpp>
+#include <boost/thread/shared_mutex.hpp>
+
+#include "LocatorRegistrationTest.h"
+
+using namespace std;
+using namespace boost::unit_test;
+
+namespace AsteriskSCF
+{
+namespace LocatorRegistrationTests
+{
+
+//
+// NOTE:
+// This test contains a mock locator. It's a little "overkill" for this particular test in that
+// it implements features that aren't used at the moment. As this is a test for a helper class
+// in the utility library it did not make sense to introduce a physical or runtime dependency
+// on a service that might also use the thing being tested.
+//
+
+//
+// The data associated with a registration is shared amongst multiple objects. To avoid
+// circular references, it is placed into a reference counted object of its own. You end
+// up with some additional dereferencing, but 0 circular references.
+//
+class RegistrationData : public IceUtil::Shared
+{
+ typedef map<std::string, AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr> ParamMap;
+public:
+ RegistrationData() :
+ mState(AsteriskSCF::Core::Discovery::V1::Active),
+ mDestroyed(false)
+ {
+ }
+
+ AsteriskSCF::Core::Discovery::V1::ServiceStatus state()
+ {
+ boost::shared_lock<boost::shared_mutex> lock(mLock);
+ return mState;
+ }
+
+ void suspend()
+ {
+ boost::unique_lock<boost::shared_mutex> lock(mLock);
+ mState = AsteriskSCF::Core::Discovery::V1::Suspended;
+ }
+
+ void unsuspend()
+ {
+ boost::unique_lock<boost::shared_mutex> lock(mLock);
+ mState = AsteriskSCF::Core::Discovery::V1::Active;
+ }
+
+ void add(const std::string& id, const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr& p)
+ {
+ boost::unique_lock<boost::shared_mutex> lock(mLock);
+ mParameters[id] = p;
+ }
+
+ bool destroy()
+ {
+ boost::unique_lock<boost::shared_mutex> lock(mLock);
+ if (mDestroyed)
+ {
+ return false;
+ }
+ mDestroyed = true;
+ return mDestroyed;
+ }
+
+ bool isDestroyed()
+ {
+ boost::shared_lock<boost::shared_mutex> lock(mLock);
+ return mDestroyed;
+ }
+
+ bool match(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr& p)
+ {
+ boost::shared_lock<boost::shared_mutex> lock(mLock);
+ for (ParamMap::const_iterator i = mParameters.begin(); i != mParameters.end(); ++i)
+ {
+ if (i->second->category == p->category)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+private:
+ boost::shared_mutex mLock;
+ AsteriskSCF::Core::Discovery::V1::ServiceStatus mState;
+ ParamMap mParameters;
+ bool mDestroyed;
+};
+typedef IceUtil::Handle<RegistrationData> RegistrationDataPtr;
+
+class RegistrationToken : public AsteriskSCF::Core::Discovery::V1::ServiceManagement
+{
+public:
+
+ RegistrationToken(const RegistrationDataPtr& d) :
+ mData(d)
+ {
+ }
+
+ void addLocatorParams(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr& params,
+ const std::string& compareGUID,
+ const Ice::Current&)
+ {
+ statePreCheck();
+ mData->add(compareGUID, params);
+ }
+
+ AsteriskSCF::Core::Discovery::V1::ServiceStatus getStatus(const Ice::Current&) const
+ {
+ statePreCheck();
+ return mData->state();
+ }
+
+ void suspend(const Ice::Current&)
+ {
+ statePreCheck();
+ mData->suspend();
+ }
+
+ void unsuspend(const Ice::Current&)
+ {
+ statePreCheck();
+ mData->unsuspend();
+ }
+
+ void unregister(const Ice::Current&)
+ {
+ if (!mData->destroy())
+ {
+ throw Ice::ObjectNotExistException(__FILE__, __LINE__);
+ }
+ }
+
+ void statePreCheck() const
+ {
+ if (mData->isDestroyed())
+ {
+ throw Ice::ObjectNotExistException(__FILE__, __LINE__);
+ }
+ }
+
+private:
+ IceUtil::Handle<RegistrationData> mData;
+};
+
+class RegistrationHandler : public IceUtil::Shared
+{
+public:
+ RegistrationHandler(const std::string& id, const Ice::ObjectPrx& obj, const Ice::ObjectAdapterPtr& adapter) :
+ mId(id),
+ mObj(obj),
+ mAdapter(adapter),
+ mData(new RegistrationData)
+ {
+ }
+
+ AsteriskSCF::Core::Discovery::V1::ServiceStatus state() const
+ {
+ return mData->state();
+ }
+
+ void suspend()
+ {
+ mData->suspend();
+ }
+
+ void unsuspend()
+ {
+ mData->unsuspend();
+ }
+
+ bool isDestroyed()
+ {
+ return mData->isDestroyed();
+ }
+
+ Ice::ObjectPrx proxy()
+ {
+ return mObj;
+ }
+
+ AsteriskSCF::Core::Discovery::V1::ServiceManagementPrx tokenProxy()
+ {
+ if (!mData->isDestroyed())
+ {
+ boost::unique_lock<boost::shared_mutex> lock(mLock);
+ if (!mToken)
+ {
+ mToken =
+ AsteriskSCF::Core::Discovery::V1::ServiceManagementPrx::uncheckedCast(
+ mAdapter->addWithUUID(new RegistrationToken(mData)));
+ }
+ return mToken;
+ }
+ return 0;
+ }
+
+ AsteriskSCF::Core::Discovery::V1::ServiceInfo info()
+ {
+ AsteriskSCF::Core::Discovery::V1::ServiceInfo result;
+ result.guid = mId;
+ result.management = tokenProxy();
+ result.status = mData->state();
+ result.service = mObj;
+ return result;
+ }
+
+ bool matchesParameter(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr& p)
+ {
+ return mData->match(p);
+ }
+
+ void destroy()
+ {
+ mData->destroy();
+
+ AsteriskSCF::Core::Discovery::V1::ServiceManagementPrx t;
+ {
+ boost::unique_lock<boost::shared_mutex> lock(mLock);
+ t = mToken;
+ mToken = 0;
+ }
+
+ if (t)
+ {
+ mAdapter->remove(mToken->ice_getIdentity());
+ mToken = 0;
+ }
+ }
+
+private:
+ boost::shared_mutex mLock;
+ std::string mId;
+ Ice::ObjectPrx mObj;
+ AsteriskSCF::Core::Discovery::V1::ServiceManagementPrx mToken;
+ Ice::ObjectAdapterPtr mAdapter;
+ RegistrationDataPtr mData;
+};
+typedef IceUtil::Handle<RegistrationHandler> RegistrationHandlerPtr;
+
+class RegistrantDatabase : public IceUtil::Shared
+{
+ typedef std::map<std::string, RegistrationHandlerPtr> RegistrantMap;
+public:
+ RegistrantDatabase(const Ice::ObjectAdapterPtr& adapter) :
+ mAdapter(adapter)
+ {
+ }
+
+ RegistrationHandlerPtr find(const std::string& id)
+ {
+ boost::shared_lock<boost::shared_mutex> lock(mLock);
+ RegistrantMap::const_iterator entry = mRegistrants.find(id);
+ if (entry == mRegistrants.end())
+ {
+ return 0;
+ }
+ return entry->second;
+ }
+
+ RegistrationHandlerPtr add(const std::string& id, const Ice::ObjectPrx& p)
+ {
+ RegistrationHandlerPtr existing(find(id));
+ if (existing)
+ {
+ existing->destroy();
+ }
+
+ RegistrationHandlerPtr h(new RegistrationHandler(id, p, mAdapter));
+ boost::unique_lock<boost::shared_mutex> lock(mLock);
+ mRegistrants.insert(make_pair(id, h));
+ return h;
+ }
+
+ std::vector<RegistrationHandlerPtr> getAll()
+ {
+ std::vector<RegistrationHandlerPtr> result;
+ boost::shared_lock<boost::shared_mutex> lock(mLock);
+ for (RegistrantMap::const_iterator i = mRegistrants.begin(); i != mRegistrants.end(); ++i)
+ {
+ result.push_back(i->second);
+ }
+ return result;
+ }
+
+private:
+ boost::shared_mutex mLock;
+ RegistrantMap mRegistrants;
+ Ice::ObjectAdapterPtr mAdapter;
+};
+
+typedef IceUtil::Handle<RegistrantDatabase> RegistrantDatabasePtr;
+
+class MockLocatorManager : public AsteriskSCF::Core::Discovery::V1::ServiceLocatorManagement
+{
+public:
+ MockLocatorManager(const RegistrantDatabasePtr& db) :
+ mDB(db)
+ {
+ }
+
+ AsteriskSCF::Core::Discovery::V1::ServiceManagementPrx addService(const Ice::ObjectPrx& service,
+ const std::string& guid, const Ice::Current&)
+ {
+ return mDB->add(guid, service)->tokenProxy();
+ }
+
+ AsteriskSCF::Core::Discovery::V1::ServiceInfoSeq getServices(const Ice::Current&) const
+ {
+ std::vector<RegistrationHandlerPtr> serviceHandlers(mDB->getAll());
+ AsteriskSCF::Core::Discovery::V1::ServiceInfoSeq result;
+ for (std::vector<RegistrationHandlerPtr>::const_iterator i = serviceHandlers.begin(); i != serviceHandlers.end(); ++i)
+ {
+ result.push_back((*i)->info());
+ }
+ return result;
+ }
+
+ AsteriskSCF::Core::Discovery::V1::ServiceInfo getService(const std::string& guid, const Ice::Current&) const
+ {
+ RegistrationHandlerPtr r = mDB->find(guid);
+ if (r)
+ {
+ return r->info();
+ }
+ return AsteriskSCF::Core::Discovery::V1::ServiceInfo();
+ }
+
+ void addCompare(const std::string&, const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsComparePrx&,
+ const Ice::Current&)
+ {
+ // NO-OP
+ }
+
+ void removeCompare(const std::string&, const Ice::Current&)
+ {
+ //NO-OP
+ }
+
+private:
+ mutable RegistrantDatabasePtr mDB;
+};
+
+class MockLocator : public AsteriskSCF::Core::Discovery::V1::ServiceLocator
+{
+public:
+ MockLocator(const RegistrantDatabasePtr& db) :
+ mDB(db)
+ {
+ }
+
+ void locate_async(const AsteriskSCF::Core::Discovery::V1::AMD_ServiceLocator_locatePtr& cb,
+ const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr& params, const Ice::Current&)
+ {
+ try
+ {
+ Ice::ObjectPrx result;
+ std::vector<RegistrationHandlerPtr> services = mDB->getAll();
+ for (std::vector<RegistrationHandlerPtr>::const_iterator i = services.begin(); i != services.end(); ++i)
+ {
+ if ((*i)->matchesParameter(params))
+ {
+ result = (*i)->proxy();
+ break;
+ }
+ }
+ cb->ice_response(result);
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cb->ice_exception(ex);
+ }
+ }
+
+ void locateAll_async(const AsteriskSCF::Core::Discovery::V1::AMD_ServiceLocator_locateAllPtr& cb,
+ const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr& parms,
+ const Ice::Current&)
+ {
+ try
+ {
+ Ice::ObjectProxySeq result;
+ std::vector<RegistrationHandlerPtr> services = mDB->getAll();
+ for (std::vector<RegistrationHandlerPtr>::const_iterator i = services.begin(); i != services.end(); ++i)
+ {
+ if ((*i)->matchesParameter(parms))
+ {
+ result.push_back((*i)->proxy());
+ }
+ }
+ cb->ice_response(result);
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cb->ice_exception(ex);
+ }
+ }
+
+private:
+ RegistrantDatabasePtr mDB;
+};
+
+class TestDiscoveryService
+{
+public:
+ TestDiscoveryService(const Ice::CommunicatorPtr& communicator) :
+ mCommunicator(communicator)
+ {
+ propGetSet(mCommunicator->getProperties(), "TestDiscoveryAdapter.Endpoints", "default");
+ propGetSet(mCommunicator->getProperties(), "TestDiscoveryAdapter.ThreadPool.Size", "4");
+ }
+
+ void initialize()
+ {
+ boost::unique_lock<boost::shared_mutex> lock(mLock);
+ if (!mAdapter)
+ {
+ mAdapter = mCommunicator->createObjectAdapter("TestDiscoveryAdapter");
+ mDB = new RegistrantDatabase(mAdapter);
+ mLocator =
+ AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx::uncheckedCast(mAdapter->addWithUUID(new MockLocator(mDB)));
+ mManager =
+ AsteriskSCF::Core::Discovery::V1::ServiceLocatorManagementPrx::uncheckedCast(mAdapter->addWithUUID(new MockLocatorManager(mDB)));
+
+ mCommunicator->getProperties()->setProperty("LocatorService.Proxy", mLocator->ice_toString());
+ mCommunicator->getProperties()->setProperty("LocatorServiceManager.Proxy", mManager->ice_toString());
+ mAdapter->activate();
+ //
+ // Looks a little weird maybe, but WHY can't the manager be added to the locator. It makes a whole whackload of sense really.
+ //
+ mMgrTokenUUID = IceUtil::generateUUID();
+ mMgrToken = mManager->addService(mManager, mMgrTokenUUID);
+ AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr params(new AsteriskSCF::Core::Discovery::V1::ServiceLocatorParams);
+ params->category = "AsteriskSCF.LocatorManager";
+ mMgrToken->addLocatorParams(params, "");
+ }
+ }
+
+ void destroy()
+ {
+ Ice::ObjectAdapterPtr adapter;
+ Ice::ObjectPrx locator;
+ Ice::ObjectPrx manager;
+ AsteriskSCF::Core::Discovery::V1::ServiceManagementPrx token;
+ {
+ boost::unique_lock<boost::shared_mutex> lock(mLock);
+ adapter = mAdapter;
+ mAdapter = 0;
+ locator = mLocator;
+ mLocator = 0;
+ manager = mManager;
+ mManager = 0;
+ token = mMgrToken;
+ mMgrToken = 0;
+ }
+ if (token)
+ {
+ token->unregister();
+ }
+ if (adapter)
+ {
+ if (locator)
+ {
+ adapter->remove(mLocator->ice_getIdentity());
+ }
+ if (manager)
+ {
+ adapter->remove(mManager->ice_getIdentity());
+ }
+ adapter->destroy();
+ }
+ }
+
+ RegistrantDatabasePtr db()
+ {
+ return mDB;
+ }
+
+private:
+ Ice::CommunicatorPtr mCommunicator;
+ Ice::ObjectAdapterPtr mAdapter;
+ boost::shared_mutex mLock;
+ AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx mLocator;
+ AsteriskSCF::Core::Discovery::V1::ServiceLocatorManagementPrx mManager;
+ AsteriskSCF::Core::Discovery::V1::ServiceManagementPrx mMgrToken;
+ std::string mMgrTokenUUID;
+ RegistrantDatabasePtr mDB;
+};
+
+template <class T>
+class AutoDestroy
+{
+public:
+ AutoDestroy(T& o) :
+ mClient(o)
+ {
+ }
+
+ ~AutoDestroy()
+ {
+ try
+ {
+ mClient.destroy();
+ }
+ catch(const std::exception& ex)
+ {
+ BOOST_MESSAGE(ex.what());
+ }
+ catch(...)
+ {
+ }
+ }
+private:
+ T& mClient;
+};
+
+//
+// This interface was handy, physical dependency wise so we'll just create
+// a simple servant to register.
+//
+class TestListener : public AsteriskSCF::System::Discovery::Events
+{
+public:
+ void comparisonRegistered(const std::string&, const Ice::Current&)
+ {
+ }
+
+ void comparisonUnregistered(const std::string&, const Ice::Current&)
+ {
+ }
+
+ void serviceRegistered(const std::string&, const Ice::Current&)
+ {
+ }
+
+ void serviceUnregistered(const std::string&, const Ice::Current&)
+ {
+ }
+
+ void serviceSuspended(const std::string&, const Ice::Current&)
+ {
+ }
+
+ void serviceUnsuspended(const std::string&, const Ice::Current&)
+ {
+ }
+};
+
+class ClientTestEnvironment
+{
+public:
+ ClientTestEnvironment(const Ice::CommunicatorPtr& comm) :
+ mCommunicator(comm)
+ {
+ propGetSet(mCommunicator->getProperties(), "TestClientAdapter.Endpoints", "default");
+ propGetSet(mCommunicator->getProperties(), "TestClientAdapter.ThreadPool.Size", "4");
+ }
+
+ void initialize()
+ {
+ boost::unique_lock<boost::shared_mutex> lock(mLock);
+ mAdapter = mCommunicator->createObjectAdapter("TestClientAdapter");
+ mClientPrx = AsteriskSCF::System::Discovery::EventsPrx::uncheckedCast(mAdapter->addWithUUID(new TestListener));
+ }
+
+ AsteriskSCF::System::Discovery::EventsPrx proxy()
+ {
+ boost::shared_lock<boost::shared_mutex> lock(mLock);
+ return mClientPrx;
+ }
+
+ void destroy()
+ {
+ Ice::ObjectAdapterPtr adapter;
+ Ice::ObjectPrx obj;
+ {
+ boost::unique_lock<boost::shared_mutex> lock(mLock);
+ obj = mClientPrx;
+ mClientPrx = 0;
+ adapter = mAdapter;
+ mAdapter = 0;
+ }
+
+ if (adapter)
+ {
+ if (obj)
+ {
+ adapter->remove(obj->ice_getIdentity());
+ }
+ adapter->destroy();
+ }
+ }
+
+private:
+ boost::shared_mutex mLock;
+ Ice::CommunicatorPtr mCommunicator;
+ Ice::ObjectAdapterPtr mAdapter;
+ AsteriskSCF::System::Discovery::EventsPrx mClientPrx;
+};
+
+class TestRunner
+{
+public:
+ TestRunner(const Ice::CommunicatorPtr& comm) :
+ mCommunicator(comm),
+ mLocator(comm),
+ mClientEnvironment(comm)
+ {
+ }
+
+ void run()
+ {
+ //
+ // Simple trick to make sure the bits get cleaned up without having to lace all of the code paths with
+ // "destroy()" calls.
+ //
+ AutoDestroy<ClientTestEnvironment> clientDestroy(mClientEnvironment);
+ mClientEnvironment.initialize();
+
+ AutoDestroy<TestDiscoveryService> locatorDestroy(mLocator);
+ mLocator.initialize();
+
+ AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr params(new AsteriskSCF::Core::Discovery::V1::ServiceLocatorParams);
+ params->category = "TestListener";
+
+ std::string id = IceUtil::generateUUID();
+ IceUtil::Handle<LocatorRegistrationWrapper<AsteriskSCF::System::Discovery::EventsPrx> > registrationWrapper =
+ new LocatorRegistrationWrapper<AsteriskSCF::System::Discovery::EventsPrx>(
+ mCommunicator,
+ mCommunicator->getProperties()->getProperty("LocatorServiceManager.Proxy"),
+ mClientEnvironment.proxy(),
+ id,
+ params);
+ IceUtil::Handle<RegisterThread<AsteriskSCF::System::Discovery::EventsPrx> >
+ t = new RegisterThread<AsteriskSCF::System::Discovery::EventsPrx>(registrationWrapper,
+ IceUtil::Time::seconds(1));
+ t->start();
+ t->getThreadControl().join();
+ RegistrationHandlerPtr entry = mLocator.db()->find(id);
+ BOOST_REQUIRE(entry);
+ bool checkResult = entry->matchesParameter(params);
+ BOOST_CHECK(checkResult);
+ }
+private:
+ Ice::CommunicatorPtr mCommunicator;
+ TestDiscoveryService mLocator;
+ ClientTestEnvironment mClientEnvironment;
+};
+}
+}
+
+using namespace AsteriskSCF::LocatorRegistrationTests;
+
+AsteriskSCF::LocatorRegistrationTests::LocatorRegistrationTestSuite::LocatorRegistrationTestSuite(const Ice::CommunicatorPtr& communicator) :
+ mImpl(new TestRunner(communicator))
+{
+ framework::master_test_suite().
+ add(BOOST_TEST_CASE(boost::bind(&TestRunner::run, mImpl)));
+}
diff --git a/test/LocatorRegistration/LocatorRegistrationTest.h b/test/LocatorRegistration/LocatorRegistrationTest.h
new file mode 100644
index 0000000..674ab39
--- /dev/null
+++ b/test/LocatorRegistration/LocatorRegistrationTest.h
@@ -0,0 +1,44 @@
+/*
+ * Asterisk SCF -- An open-source communications framework.
+ *
+ * Copyright (C) 2010-2011, Digium, Inc.
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk SCF project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE.txt file
+ * at the top of the source tree.
+ */
+
+#pragma once
+
+#include <Ice/Ice.h>
+#include <boost/shared_ptr.hpp>
+
+namespace AsteriskSCF
+{
+//
+// Forward declarations.
+//
+namespace LocatorRegistrationTests
+{
+class TestRunner;
+
+class LocatorRegistrationTestSuite
+{
+public:
+ /**
+ * Registers the test suite with the global test suite. There isn't anything else that needs to be done.
+ **/
+ LocatorRegistrationTestSuite(const Ice::CommunicatorPtr& comm);
+
+private:
+ boost::shared_ptr<LocatorRegistrationTests::TestRunner> mImpl;
+};
+
+} /* End of namespace IceUtilCppTests */
+} /* End of namespace AsteriskSCF */
-----------------------------------------------------------------------
--
asterisk-scf/integration/ice-util-cpp.git
More information about the asterisk-scf-commits
mailing list