summaryrefslogtreecommitdiff
path: root/matlab/test/Ice/operations/AllTests.m
blob: 498463144f0c6a3b53e77e6149d193ccf9e3f028 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
%
% Copyright (c) ZeroC, Inc. All rights reserved.
%

classdef AllTests
    methods(Static)
        function r = allTests(helper)
            import Test.*;
            import M.*;

            communicator = helper.communicator();
            ref = ['test:', helper.getTestEndpoint()];
            base = communicator.stringToProxy(ref);
            cl = MyClassPrx.checkedCast(base);
            derived = MyDerivedClassPrx.checkedCast(cl);

            bprx = BPrx.checkedCast(communicator.stringToProxy(['b:', helper.getTestEndpoint()]));

            fprintf('testing twoway operations... ');
            Twoways.twoways(helper, cl, bprx);
            Twoways.twoways(helper, derived, bprx);
            derived.opDerived();
            fprintf('ok\n');

            fprintf('testing oneway operations... ');
            Oneways.oneways(cl);
            fprintf('ok\n');

            fprintf('testing twoway operations with AMI... ');
            TwowaysAMI.twowaysAMI(helper, cl);
            TwowaysAMI.twowaysAMI(helper, derived);
            fprintf('ok\n');

            fprintf('testing oneway operations with AMI... ');
            OnewaysAMI.onewaysAMI(cl);
            fprintf('ok\n');

            fprintf('testing batch oneway operations... ');
            BatchOneways.batchOneways(helper, cl);
            BatchOneways.batchOneways(helper, derived);
            fprintf('ok\n');

            fprintf('testing batch AMI oneway operations... ');
            BatchOnewaysAMI.batchOneways(cl);
            BatchOnewaysAMI.batchOneways(derived);
            fprintf('ok\n');

            r = cl;
        end
    end
end