1 // 2 // Copyright (c) ZeroC, Inc. All rights reserved. 3 // 4 5 #include <Ice/Ice.h> 6 #include <TestHelper.h> 7 #include <TestI.h> 8 9 using namespace std; 10 11 class Server : public Test::TestHelper 12 { 13 public: 14 15 void run(int, char**); 16 }; 17 18 void 19 Server::run(int argc, char** argv) 20 { 21 Ice::PropertiesPtr properties = createTestProperties(argc, argv); 22 properties->setProperty("Ice.Warn.Dispatch", "0"); 23 Ice::CommunicatorHolder communicator = initialize(argc, argv, properties); 24 communicator->getProperties()->setProperty("TestAdapter.Endpoints", getTestEndpoint()); 25 Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter"); 26 adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), Ice::stringToIdentity("test")); 27 adapter->activate(); 28 serverReady(); enable_vmx(void)29 communicator->waitForShutdown(); 30 } 31 32 DEFINE_TEST(Server) 33