summaryrefslogtreecommitdiff
path: root/cpp/test/IceStorm/repstress/Control.cpp
blob: 32078d0b56c6e526ed1b0ea9a7e58d6424098c5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// **********************************************************************
//
// Copyright (c) 2003-present ZeroC, Inc. All rights reserved.
//
// **********************************************************************

#include <Ice/Ice.h>
#include <Controller.h>
#include <TestHelper.h>

using namespace std;
using namespace Ice;
using namespace Test;

class Control : public Test::TestHelper
{
public:

    void run(int, char**);
};

void
Control::run(int argc, char** argv)
{
    Ice::CommunicatorHolder communicator = initialize(argc, argv);
    if(argc < 2)
    {
        ostringstream os;
        os << "Usage: " << argv[0] << " proxy";
        throw invalid_argument(os.str());
    }

    ControllerPrx control = ControllerPrx::uncheckedCast(communicator->stringToProxy(argv[1]));
    control->stop();
}

DEFINE_TEST(Control)