All files / output zcl_abapgit_aff_registry.clas.testclasses.mjs

100% Statements 94/94
81.81% Branches 18/22
81.25% Functions 13/16
100% Lines 94/94

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 941x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 1x 9x 9x 9x 1x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 1x 9x 8x 8x 9x 9x 9x 9x 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
const {zcl_abapgit_aff_registry} = await import("./zcl_abapgit_aff_registry.clas.mjs");
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_aff_registry.clas.testclasses.abap
 
 
class ltcl_aff_registry {
  static STATIC_SUPER = undefined;
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CLAS-ZCL_ABAPGIT_AFF_REGISTRY-LTCL_AFF_REGISTRY';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {};
  static METHODS = {"ASSERT_THAT": {"visibility": "I", "parameters": {"IV_OBJ_TYPE": {"type": () => {return new abap.types.Character(4, {});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "IV_IS_SUPPORTED": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}, "IV_EXPERIMENTAL": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " ", "parm_kind": "I", "type_name": "CharacterType"}}},
  "CLAS_NOT_SUPPORTED": {"visibility": "I", "parameters": {}},
  "CHKC": {"visibility": "I", "parameters": {}},
  "CHKO": {"visibility": "I", "parameters": {}},
  "CHKV": {"visibility": "I", "parameters": {}},
  "EVTB": {"visibility": "I", "parameters": {}},
  "GSMP": {"visibility": "I", "parameters": {}},
  "INTF_NOT_SUPPORTED": {"visibility": "I", "parameters": {}},
  "INTF_EXPERIMENTAL": {"visibility": "I", "parameters": {}},
  "SMBC": {"visibility": "I", "parameters": {}}};
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "assert_that": this.#assert_that.bind(this),
      "clas_not_supported": this.#clas_not_supported.bind(this),
      "chkc": this.#chkc.bind(this),
      "chko": this.#chko.bind(this),
      "chkv": this.#chkv.bind(this),
      "evtb": this.#evtb.bind(this),
      "gsmp": this.#gsmp.bind(this),
      "intf_not_supported": this.#intf_not_supported.bind(this),
      "intf_experimental": this.#intf_experimental.bind(this),
      "smbc": this.#smbc.bind(this),
    };
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async #assert_that(INPUT) {
    let iv_obj_type = INPUT?.iv_obj_type;
    if (iv_obj_type === undefined) { iv_obj_type = new abap.types.Character(4, {}).set(INPUT.iv_obj_type); }
    let iv_is_supported = INPUT?.iv_is_supported;
    if (iv_is_supported?.getQualifiedName === undefined || iv_is_supported.getQualifiedName() !== "ABAP_BOOL") { iv_is_supported = undefined; }
    if (iv_is_supported === undefined) { iv_is_supported = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}).set(INPUT.iv_is_supported); }
    let iv_experimental = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.iv_experimental) {iv_experimental.set(INPUT.iv_experimental);}
    if (INPUT === undefined || INPUT.iv_experimental === undefined) {iv_experimental = abap.builtin.abap_false;}
    let lo_cut = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_AFF_REGISTRY", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_AFF_REGISTRY"});
    let lo_settings_stub = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_SETTINGS", RTTIName: "\\CLASS=ZCL_ABAPGIT_SETTINGS"});
    let lv_act = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    lo_settings_stub.set((await (await abap.Classes['ZCL_ABAPGIT_PERSIST_FACTORY'].get_settings()).get().zif_abapgit_persist_settings$read()));
    if (abap.compare.eq(iv_experimental, abap.builtin.abap_true)) {
      await lo_settings_stub.get().set_experimental_features({iv_features: abap.Classes['ZCL_ABAPGIT_AFF_REGISTRY'].c_aff_feature});
    } else {
      await lo_settings_stub.get().set_experimental_features({iv_features: abap.CharacterFactory.get(1, '')});
    }
    lo_cut.set(await (new abap.Classes['ZCL_ABAPGIT_AFF_REGISTRY']()).constructor_());
    lv_act.set((await lo_cut.get().zif_abapgit_aff_registry$is_supported_object_type({iv_obj_type: iv_obj_type})));
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({exp: iv_is_supported, act: lv_act});
  }
  async #clas_not_supported() {
    await this.#assert_that({iv_obj_type: abap.CharacterFactory.get(4, 'CLAS'), iv_is_supported: abap.builtin.abap_false});
  }
  async #chkc() {
    await this.#assert_that({iv_obj_type: abap.CharacterFactory.get(4, 'CHKC'), iv_is_supported: abap.builtin.abap_true});
  }
  async #chko() {
    await this.#assert_that({iv_obj_type: abap.CharacterFactory.get(4, 'CHKO'), iv_is_supported: abap.builtin.abap_true});
  }
  async #chkv() {
    await this.#assert_that({iv_obj_type: abap.CharacterFactory.get(4, 'CHKV'), iv_is_supported: abap.builtin.abap_true});
  }
  async #evtb() {
    await this.#assert_that({iv_obj_type: abap.CharacterFactory.get(4, 'EVTB'), iv_is_supported: abap.builtin.abap_true});
  }
  async #gsmp() {
    await this.#assert_that({iv_obj_type: abap.CharacterFactory.get(4, 'GSMP'), iv_is_supported: abap.builtin.abap_true});
  }
  async #intf_not_supported() {
    await this.#assert_that({iv_obj_type: abap.CharacterFactory.get(4, 'INTF'), iv_is_supported: abap.builtin.abap_false});
  }
  async #intf_experimental() {
    await this.#assert_that({iv_obj_type: abap.CharacterFactory.get(4, 'INTF'), iv_is_supported: abap.builtin.abap_true, iv_experimental: abap.builtin.abap_true});
  }
  async #smbc() {
    await this.#assert_that({iv_obj_type: abap.CharacterFactory.get(4, 'SMBC'), iv_is_supported: abap.builtin.abap_true});
  }
}
abap.Classes['CLAS-ZCL_ABAPGIT_AFF_REGISTRY-LTCL_AFF_REGISTRY'] = ltcl_aff_registry;
export {ltcl_aff_registry};