All files / output zcl_abapgit_zlib_convert.clas.testclasses.mjs

100% Statements 44/44
88.88% Branches 8/9
87.5% Functions 7/8
100% Lines 44/44

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 441x 1x 1x 2x 2x 2x 2x 2x 2x 1x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 1x 1x 1x 1x 2x 1x 1x 1x 1x 2x 1x 1x
const {zcl_abapgit_zlib_convert} = await import("./zcl_abapgit_zlib_convert.clas.mjs");
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_zlib_convert.clas.testclasses.abap
class ltcl_test {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CLAS-ZCL_ABAPGIT_ZLIB_CONVERT-LTCL_TEST';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {"MO_CUT": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_ZLIB_CONVERT", RTTIName: "\\CLASS=ZCL_ABAPGIT_ZLIB_CONVERT"});}, "visibility": "I", "is_constant": " ", "is_class": " "}};
  static METHODS = {"SETUP": {"visibility": "I", "parameters": {}},
  "BITS_TO_INT": {"visibility": "I", "parameters": {}},
  "HEX_TO_BITS": {"visibility": "I", "parameters": {}}};
  #mo_cut;
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "setup": this.#setup.bind(this),
      "bits_to_int": this.#bits_to_int.bind(this),
      "hex_to_bits": this.#hex_to_bits.bind(this),
    };
    this.#mo_cut = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_ZLIB_CONVERT", RTTIName: "\\CLASS=ZCL_ABAPGIT_ZLIB_CONVERT"});
    this.FRIENDS_ACCESS_INSTANCE["mo_cut"] = this.#mo_cut;
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async #setup() {
    this.#mo_cut.set(await (new abap.Classes['ZCL_ABAPGIT_ZLIB_CONVERT']()).constructor_());
  }
  async #bits_to_int() {
    let lv_result = new abap.types.Integer({qualifiedName: "I"});
    lv_result.set((await this.#mo_cut.get().bits_to_int({iv_bits: abap.CharacterFactory.get(3, '111')})));
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: lv_result, exp: abap.IntegerFactory.get(7)});
  }
  async #hex_to_bits() {
    let lv_bits = new abap.types.String({qualifiedName: "STRING"});
    lv_bits.set((await this.#mo_cut.get().hex_to_bits({iv_hex: abap.CharacterFactory.get(4, '0101')})));
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: lv_bits, exp: abap.CharacterFactory.get(16, '0000000100000001')});
  }
}
abap.Classes['CLAS-ZCL_ABAPGIT_ZLIB_CONVERT-LTCL_TEST'] = ltcl_test;
export {ltcl_test};