All files / test/Ice/operations Oneways.js

80.95% Statements 34/42
33.33% Branches 2/6
100% Functions 1/1
80.95% Lines 34/42

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 431x 1x 1x 1x 1x 1x 1x 1x 1x     1x 1x 1x 1x 1x 1x     1x 1x 1x 1x 1x 1x     1x 1x 1x 1x 1x 1x 1x 1x     1x 1x 1x 1x 1x  
// Copyright (c) ZeroC, Inc.
import { Ice } from "@zeroc/ice";
import { Test } from "./Test.js";
import { test } from "../../Common/TestHelper.js";
export async function oneways(prx) {
    prx = prx.ice_oneway();
    await prx.ice_ping();
    try {
        await prx.ice_isA(Test.MyClass.ice_staticId());
        test(false);
    }
    catch (ex) {
        // Expected: twoway proxy required
        test(ex instanceof Ice.TwowayOnlyException, ex);
    }
    try {
        await prx.ice_id();
        test(false);
    }
    catch (ex) {
        // Expected: twoway proxy required
        test(ex instanceof Ice.TwowayOnlyException, ex);
    }
    try {
        await prx.ice_ids();
        test(false);
    }
    catch (ex) {
        // Expected: twoway proxy required
        test(ex instanceof Ice.TwowayOnlyException, ex);
    }
    await prx.opVoid();
    await prx.opIdempotent();
    try {
        await prx.opByte(0xff, 0x0f);
        test(false);
    }
    catch (ex) {
        // Expected: twoway proxy required
        test(ex instanceof Ice.TwowayOnlyException, ex);
    }
}