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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | 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 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 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 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | // Copyright (c) ZeroC, Inc.
import { Test } from "./Test.js";
import { TestHelper, test } from "../../Common/TestHelper.js";
export class Client extends TestHelper {
async allTests() {
const communicator = this.communicator();
const out = this.getWriter();
const initial = new Test.InitialPrx(communicator, `initial:${this.getTestEndpoint()}`);
out.write("getting proxies for interface hierarchy... ");
const ia = await initial.iaop();
test(ia !== null);
const ib1 = await initial.ib1op();
test(ib1 !== null);
const ib2 = await initial.ib2op();
test(ib2 !== null);
const ic = await initial.icop();
test(ic !== null);
test(ia != ib1);
test(ia != ib2);
test(ia != ic);
test(ib1 != ic);
test(ib2 != ic);
out.writeLine("ok");
out.write("invoking proxy operations on interface hierarchy... ");
let iao = await ia.iaop(ia);
test(ia.equals(iao));
iao = await ia.iaop(ib1);
test(ib1.equals(iao));
iao = await ia.iaop(ib2);
test(ib2.equals(iao));
iao = await ia.iaop(ic);
test(ic.equals(iao));
iao = await ib1.iaop(ia);
test(ia.equals(iao));
iao = await ib1.iaop(ib1);
test(ib1.equals(iao));
iao = await ib1.iaop(ib2);
test(ib2.equals(iao));
iao = await ib1.iaop(ic);
test(ic.equals(iao));
iao = await ib2.iaop(ia);
test(ia.equals(iao));
iao = await ib2.iaop(ib1);
test(ib1.equals(iao));
iao = await ib2.iaop(ib2);
test(ib2.equals(iao));
iao = await ib2.iaop(ic);
test(ic.equals(iao));
iao = await ic.iaop(ia);
test(ia.equals(iao));
iao = await ic.iaop(ib1);
test(ib1.equals(iao));
iao = await ic.iaop(ib2);
test(ib2.equals(iao));
iao = await ic.iaop(ic);
test(ic.equals(iao));
iao = await ib1.ib1op(ib1);
test(ib1.equals(iao));
let ib1o = await ib1.ib1op(ib1);
test(ib1.equals(ib1o));
iao = await ib1.ib1op(ic);
test(ic.equals(iao));
ib1o = await ib1.ib1op(ic);
test(ic.equals(ib1o));
iao = await ic.ib1op(ib1);
test(ib1.equals(iao));
ib1o = await ic.ib1op(ib1);
test(ib1.equals(ib1o));
iao = await ic.ib1op(ic);
test(ic.equals(iao));
ib1o = await ic.ib1op(ic);
test(ic.equals(ib1o));
iao = await ib2.ib2op(ib2);
test(ib2.equals(iao));
let ib2o = await ib2.ib2op(ib2);
test(ib2.equals(ib2o));
iao = await ib2.ib2op(ic);
test(ic.equals(iao));
ib2o = await ib2.ib2op(ic);
test(ic.equals(ib2o));
iao = await ic.ib2op(ib2);
test(ib2.equals(iao));
ib2o = await ic.ib2op(ib2);
test(ib2.equals(ib2o));
iao = await ic.ib2op(ic);
test(ic.equals(iao));
ib2o = await ic.ib2op(ic);
test(ic.equals(ib2o));
iao = await ic.icop(ic);
test(ic.equals(iao));
ib1o = await ic.icop(ic);
test(ic.equals(ib1o));
ib2o = await ic.icop(ic);
test(ic.equals(ib2o));
const ico = await ic.icop(ic);
test(ico !== null);
test(ico.equals(ic));
out.writeLine("ok");
await initial.shutdown();
}
async run(args) {
let communicator = null;
try {
[communicator] = this.initialize(args);
await this.allTests();
}
finally {
if (communicator) {
await communicator.destroy();
}
}
}
}
|