diff options
Diffstat (limited to 'cpp/test/Ice/servantLocator/Collocated.cpp')
-rw-r--r-- | cpp/test/Ice/servantLocator/Collocated.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cpp/test/Ice/servantLocator/Collocated.cpp b/cpp/test/Ice/servantLocator/Collocated.cpp index af3315d8bfd..777030c17f5 100644 --- a/cpp/test/Ice/servantLocator/Collocated.cpp +++ b/cpp/test/Ice/servantLocator/Collocated.cpp @@ -48,6 +48,25 @@ protected: } }; +class TestActivationI : public Test::TestActivation +{ +public: + + void activateServantLocator(bool activate, const Ice::Current& current) + { + if(activate) + { + current.adapter->addServantLocator(new ServantLocatorI(""), ""); + current.adapter->addServantLocator(new ServantLocatorI("category"), "category"); + } + else + { + current.adapter->removeServantLocator(""); + current.adapter->removeServantLocator("category"); + } + } +}; + class TestServer : public Application { public: @@ -70,6 +89,7 @@ TestServer::run(int argc, char* argv[]) adapter->addServantLocator(new ServantLocatorI(""), ""); adapter->addServantLocator(new ServantLocatorI("category"), "category"); adapter->add(new TestI, communicator()->stringToIdentity("asm")); + adapter->add(new TestActivationI, communicator()->stringToIdentity("test/activation")); Test::TestIntfPrx allTests(const CommunicatorPtr&, bool); allTests(communicator(), true); |