All files / output zcl_abapgit_log.clas.testclasses.mjs

99.18% Statements 243/245
88% Branches 22/25
72.41% Functions 21/29
99.18% Lines 243/245

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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 2451x 1x 1x 9x 9x 9x 9x 9x 9x 1x 1x 1x 1x 1x 1x 1x 1x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 9x 1x 1x 1x 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 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 9x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 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 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 1x 1x 1x 1x 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 1x 1x 1x 9x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 9x 1x 1x 1x 1x 1x 1x 1x 1x 1x 9x 1x 1x
const {zcl_abapgit_log} = await import("./zcl_abapgit_log.clas.mjs");
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_log.clas.testclasses.abap
class ltcl_test {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CLAS-ZCL_ABAPGIT_LOG-LTCL_TEST';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {"MI_CUT": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_LOG", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_LOG"});}, "visibility": "I", "is_constant": " ", "is_class": " "}};
  static METHODS = {"SETUP": {"visibility": "I", "parameters": {}},
  "FROM_X": {"visibility": "I", "parameters": {}},
  "GET_STATUS": {"visibility": "I", "parameters": {}},
  "GET_LOG_LEVEL": {"visibility": "I", "parameters": {}},
  "MERGE_WITH": {"visibility": "I", "parameters": {}},
  "MERGE_WITH_MIN_LEVEL": {"visibility": "I", "parameters": {}},
  "EMPTY": {"visibility": "I", "parameters": {}},
  "CLONE": {"visibility": "I", "parameters": {}},
  "ADD": {"visibility": "I", "parameters": {}},
  "ADD_WITH_ID_NUMBER": {"visibility": "I", "parameters": {}}};
  #mi_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),
      "from_x": this.#from_x.bind(this),
      "get_status": this.#get_status.bind(this),
      "get_log_level": this.#get_log_level.bind(this),
      "merge_with": this.#merge_with.bind(this),
      "merge_with_min_level": this.#merge_with_min_level.bind(this),
      "empty": this.#empty.bind(this),
      "clone": this.#clone.bind(this),
      "add": this.#add.bind(this),
      "add_with_id_number": this.#add_with_id_number.bind(this),
    };
    this.#mi_cut = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_LOG", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_LOG"});
    this.FRIENDS_ACCESS_INSTANCE["mi_cut"] = this.#mi_cut;
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async #setup() {
    this.#mi_cut.set(await (new abap.Classes['ZCL_ABAPGIT_LOG']()).constructor_());
  }
  async #empty() {
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$count()), exp: abap.IntegerFactory.get(0)});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$get_title()), exp: abap.CharacterFactory.get(3, 'Log')});
  }
  async #add() {
    let lv_message = new abap.types.String({qualifiedName: "STRING"});
    let lt_messages = abap.types.TableFactory.construct(new abap.types.Structure({
    "type": new abap.types.Character(1, {"qualifiedName":"sy-msgty"}),
    "id": new abap.types.Character(20, {"qualifiedName":"sy-msgid"}),
    "number": new abap.types.Numc({length: 3, qualifiedName: "sy-msgno"}),
    "text": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_LOG=>TY_LOG_OUT-TEXT"}),
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "exception": new abap.types.ABAPObject({qualifiedName: "CX_ROOT", RTTIName: "\\CLASS=CX_ROOT"})}, "zif_abapgit_log=>ty_log_out", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_log=>ty_log_outs");
    let ls_message = new abap.types.Structure({
    "type": new abap.types.Character(1, {"qualifiedName":"sy-msgty"}),
    "id": new abap.types.Character(20, {"qualifiedName":"sy-msgid"}),
    "number": new abap.types.Numc({length: 3, qualifiedName: "sy-msgno"}),
    "text": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_LOG=>TY_LOG_OUT-TEXT"}),
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "exception": new abap.types.ABAPObject({qualifiedName: "CX_ROOT", RTTIName: "\\CLASS=CX_ROOT"})}, "zif_abapgit_log=>ty_log_out", undefined, {}, {});
    lv_message.set(abap.CharacterFactory.get(5, 'hello'));
    await this.#mi_cut.get().zif_abapgit_log$add({iv_msg: lv_message});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$count()), exp: abap.IntegerFactory.get(1)});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$get_status()), exp: abap.CharacterFactory.get(1, 'E')});
    lt_messages.set((await this.#mi_cut.get().zif_abapgit_log$get_messages()));
    abap.statements.readTable(lt_messages,{index: abap.IntegerFactory.get(1),
      into: ls_message});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_subrc();
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: ls_message.get().text, exp: lv_message});
  }
  async #add_with_id_number() {
    let lv_message = new abap.types.String({qualifiedName: "STRING"});
    let lt_messages = abap.types.TableFactory.construct(new abap.types.Structure({
    "type": new abap.types.Character(1, {"qualifiedName":"sy-msgty"}),
    "id": new abap.types.Character(20, {"qualifiedName":"sy-msgid"}),
    "number": new abap.types.Numc({length: 3, qualifiedName: "sy-msgno"}),
    "text": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_LOG=>TY_LOG_OUT-TEXT"}),
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "exception": new abap.types.ABAPObject({qualifiedName: "CX_ROOT", RTTIName: "\\CLASS=CX_ROOT"})}, "zif_abapgit_log=>ty_log_out", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_log=>ty_log_outs");
    let ls_message = new abap.types.Structure({
    "type": new abap.types.Character(1, {"qualifiedName":"sy-msgty"}),
    "id": new abap.types.Character(20, {"qualifiedName":"sy-msgid"}),
    "number": new abap.types.Numc({length: 3, qualifiedName: "sy-msgno"}),
    "text": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_LOG=>TY_LOG_OUT-TEXT"}),
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "exception": new abap.types.ABAPObject({qualifiedName: "CX_ROOT", RTTIName: "\\CLASS=CX_ROOT"})}, "zif_abapgit_log=>ty_log_out", undefined, {}, {});
    lv_message.set(abap.CharacterFactory.get(11, 'abracadabra'));
    await this.#mi_cut.get().zif_abapgit_log$add({iv_msg: lv_message, iv_type: abap.CharacterFactory.get(1, 'W'), iv_class: abap.CharacterFactory.get(2, 'SL'), iv_number: abap.CharacterFactory.get(3, '123')});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$count()), exp: abap.IntegerFactory.get(1)});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$get_status()), exp: abap.CharacterFactory.get(1, 'W')});
    lt_messages.set((await this.#mi_cut.get().zif_abapgit_log$get_messages()));
    abap.statements.readTable(lt_messages,{index: abap.IntegerFactory.get(1),
      into: ls_message});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_subrc();
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: ls_message.get().text, exp: lv_message});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: ls_message.get().id, exp: abap.CharacterFactory.get(2, 'SL')});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: ls_message.get().number, exp: abap.CharacterFactory.get(3, '123')});
  }
  async #get_status() {
    let lo_x = new abap.types.ABAPObject({qualifiedName: "ZCX_ABAPGIT_EXCEPTION", RTTIName: "\\CLASS=ZCX_ABAPGIT_EXCEPTION"});
    await this.#mi_cut.get().zif_abapgit_log$add_success({iv_msg: abap.CharacterFactory.get(7, 'success')});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$get_status()), exp: abap.Classes['ZIF_ABAPGIT_LOG'].zif_abapgit_log$c_status.get().ok});
    await this.#mi_cut.get().zif_abapgit_log$add_warning({iv_msg: abap.CharacterFactory.get(4, 'warn')});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$get_status()), exp: abap.Classes['ZIF_ABAPGIT_LOG'].zif_abapgit_log$c_status.get().warning});
    await this.#mi_cut.get().zif_abapgit_log$add_error({iv_msg: abap.CharacterFactory.get(3, 'err')});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$get_status()), exp: abap.Classes['ZIF_ABAPGIT_LOG'].zif_abapgit_log$c_status.get().error});
    await this.#mi_cut.get().zif_abapgit_log$clear();
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$get_status()), exp: abap.Classes['ZIF_ABAPGIT_LOG'].zif_abapgit_log$c_status.get().ok});
    lo_x.set(await (new abap.Classes['ZCX_ABAPGIT_EXCEPTION']()).constructor_({msgv1: abap.CharacterFactory.get(1, 'x')}));
    await this.#mi_cut.get().zif_abapgit_log$add_exception({ix_exc: lo_x});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$get_status()), exp: abap.Classes['ZIF_ABAPGIT_LOG'].zif_abapgit_log$c_status.get().error});
  }
  async #merge_with() {
    let li_secondary_log = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_LOG", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_LOG"});
    let lt_act_msgs = abap.types.TableFactory.construct(new abap.types.Structure({
    "type": new abap.types.Character(1, {"qualifiedName":"sy-msgty"}),
    "id": new abap.types.Character(20, {"qualifiedName":"sy-msgid"}),
    "number": new abap.types.Numc({length: 3, qualifiedName: "sy-msgno"}),
    "text": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_LOG=>TY_LOG_OUT-TEXT"}),
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "exception": new abap.types.ABAPObject({qualifiedName: "CX_ROOT", RTTIName: "\\CLASS=CX_ROOT"})}, "zif_abapgit_log=>ty_log_out", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_log=>ty_log_outs");
    li_secondary_log.set(await (new abap.Classes['ZCL_ABAPGIT_LOG']()).constructor_());
    await this.#mi_cut.get().zif_abapgit_log$add_success({iv_msg: abap.CharacterFactory.get(7, 'success')});
    await li_secondary_log.get().zif_abapgit_log$add_warning({iv_msg: abap.CharacterFactory.get(4, 'warn')});
    await this.#mi_cut.get().zif_abapgit_log$merge_with({ii_log: li_secondary_log});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$count()), exp: abap.IntegerFactory.get(2)});
    lt_act_msgs.set((await this.#mi_cut.get().zif_abapgit_log$get_messages()));
    abap.statements.readTable(lt_act_msgs,{withKey: (i) => {return abap.compare.eq(i.text, abap.CharacterFactory.get(7, 'success'));},
      withKeyValue: [{key: (i) => {return i.text}, value: abap.CharacterFactory.get(7, 'success')}],
      usesTableLine: false,
      withKeySimple: {"text": abap.CharacterFactory.get(7, 'success')}});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_subrc();
    abap.statements.readTable(lt_act_msgs,{withKey: (i) => {return abap.compare.eq(i.text, abap.CharacterFactory.get(4, 'warn'));},
      withKeyValue: [{key: (i) => {return i.text}, value: abap.CharacterFactory.get(4, 'warn')}],
      usesTableLine: false,
      withKeySimple: {"text": abap.CharacterFactory.get(4, 'warn')}});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_subrc();
  }
  async #merge_with_min_level() {
    let li_secondary_log = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_LOG", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_LOG"});
    let lt_act_msgs = abap.types.TableFactory.construct(new abap.types.Structure({
    "type": new abap.types.Character(1, {"qualifiedName":"sy-msgty"}),
    "id": new abap.types.Character(20, {"qualifiedName":"sy-msgid"}),
    "number": new abap.types.Numc({length: 3, qualifiedName: "sy-msgno"}),
    "text": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_LOG=>TY_LOG_OUT-TEXT"}),
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "exception": new abap.types.ABAPObject({qualifiedName: "CX_ROOT", RTTIName: "\\CLASS=CX_ROOT"})}, "zif_abapgit_log=>ty_log_out", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_log=>ty_log_outs");
    li_secondary_log.set(await (new abap.Classes['ZCL_ABAPGIT_LOG']()).constructor_());
    await this.#mi_cut.get().zif_abapgit_log$add_success({iv_msg: abap.CharacterFactory.get(7, 'success')});
    await li_secondary_log.get().zif_abapgit_log$add_warning({iv_msg: abap.CharacterFactory.get(4, 'warn')});
    await this.#mi_cut.get().zif_abapgit_log$merge_with({ii_log: li_secondary_log, iv_min_level: abap.Classes['ZIF_ABAPGIT_LOG'].zif_abapgit_log$c_log_level.get().error});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$count()), exp: abap.IntegerFactory.get(1)});
    lt_act_msgs.set((await this.#mi_cut.get().zif_abapgit_log$get_messages()));
    abap.statements.readTable(lt_act_msgs,{withKey: (i) => {return abap.compare.eq(i.text, abap.CharacterFactory.get(7, 'success'));},
      withKeyValue: [{key: (i) => {return i.text}, value: abap.CharacterFactory.get(7, 'success')}],
      usesTableLine: false,
      withKeySimple: {"text": abap.CharacterFactory.get(7, 'success')}});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_subrc();
    await this.#mi_cut.get().zif_abapgit_log$merge_with({ii_log: li_secondary_log, iv_min_level: abap.Classes['ZIF_ABAPGIT_LOG'].zif_abapgit_log$c_log_level.get().warning});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$count()), exp: abap.IntegerFactory.get(2)});
    lt_act_msgs.set((await this.#mi_cut.get().zif_abapgit_log$get_messages()));
    abap.statements.readTable(lt_act_msgs,{withKey: (i) => {return abap.compare.eq(i.text, abap.CharacterFactory.get(7, 'success'));},
      withKeyValue: [{key: (i) => {return i.text}, value: abap.CharacterFactory.get(7, 'success')}],
      usesTableLine: false,
      withKeySimple: {"text": abap.CharacterFactory.get(7, 'success')}});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_subrc();
    abap.statements.readTable(lt_act_msgs,{withKey: (i) => {return abap.compare.eq(i.text, abap.CharacterFactory.get(4, 'warn'));},
      withKeyValue: [{key: (i) => {return i.text}, value: abap.CharacterFactory.get(4, 'warn')}],
      usesTableLine: false,
      withKeySimple: {"text": abap.CharacterFactory.get(4, 'warn')}});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_subrc();
  }
  async #from_x() {
    let lo_x = new abap.types.ABAPObject({qualifiedName: "ZCX_ABAPGIT_EXCEPTION", RTTIName: "\\CLASS=ZCX_ABAPGIT_EXCEPTION"});
    let lt_act_msgs = abap.types.TableFactory.construct(new abap.types.Structure({
    "type": new abap.types.Character(1, {"qualifiedName":"sy-msgty"}),
    "id": new abap.types.Character(20, {"qualifiedName":"sy-msgid"}),
    "number": new abap.types.Numc({length: 3, qualifiedName: "sy-msgno"}),
    "text": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_LOG=>TY_LOG_OUT-TEXT"}),
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "exception": new abap.types.ABAPObject({qualifiedName: "CX_ROOT", RTTIName: "\\CLASS=CX_ROOT"})}, "zif_abapgit_log=>ty_log_out", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_log=>ty_log_outs");
    this.#mi_cut.set((await abap.Classes['ZCL_ABAPGIT_LOG'].from_exception({io_x: lo_x})));
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$count()), exp: abap.IntegerFactory.get(0)});
    try {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: abap.CharacterFactory.get(6, 'Error!')});
    } catch (e) {
      if ((abap.Classes['ZCX_ABAPGIT_EXCEPTION'] && e instanceof abap.Classes['ZCX_ABAPGIT_EXCEPTION'])) {
        lo_x.set(e);
        this.#mi_cut.set((await abap.Classes['ZCL_ABAPGIT_LOG'].from_exception({io_x: lo_x})));
      } else {
        throw e;
      }
    }
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_bound({act: this.#mi_cut});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$count()), exp: abap.IntegerFactory.get(1)});
    lt_act_msgs.set((await this.#mi_cut.get().zif_abapgit_log$get_messages()));
    abap.statements.readTable(lt_act_msgs,{withKey: (i) => {return abap.compare.eq(i.type, abap.CharacterFactory.get(1, 'E'));},
      withKeyValue: [{key: (i) => {return i.type}, value: abap.CharacterFactory.get(1, 'E')}],
      usesTableLine: false,
      withKeySimple: {"type": abap.CharacterFactory.get(1, 'E')}});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_subrc();
    abap.statements.readTable(lt_act_msgs,{withKey: (i) => {return abap.compare.eq(i.text, abap.CharacterFactory.get(6, 'Error!'));},
      withKeyValue: [{key: (i) => {return i.text}, value: abap.CharacterFactory.get(6, 'Error!')}],
      usesTableLine: false,
      withKeySimple: {"text": abap.CharacterFactory.get(6, 'Error!')}});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_subrc();
  }
  async #get_log_level() {
    let lo_x = new abap.types.ABAPObject({qualifiedName: "ZCX_ABAPGIT_EXCEPTION", RTTIName: "\\CLASS=ZCX_ABAPGIT_EXCEPTION"});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$get_log_level()), exp: abap.Classes['ZIF_ABAPGIT_LOG'].zif_abapgit_log$c_log_level.get().empty});
    await this.#mi_cut.get().zif_abapgit_log$add_success({iv_msg: abap.CharacterFactory.get(7, 'success')});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$get_log_level()), exp: abap.Classes['ZIF_ABAPGIT_LOG'].zif_abapgit_log$c_log_level.get().info});
    await this.#mi_cut.get().zif_abapgit_log$add_warning({iv_msg: abap.CharacterFactory.get(4, 'warn')});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$get_log_level()), exp: abap.Classes['ZIF_ABAPGIT_LOG'].zif_abapgit_log$c_log_level.get().warning});
    await this.#mi_cut.get().zif_abapgit_log$add_error({iv_msg: abap.CharacterFactory.get(3, 'err')});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$get_log_level()), exp: abap.Classes['ZIF_ABAPGIT_LOG'].zif_abapgit_log$c_log_level.get().error});
    lo_x.set(await (new abap.Classes['ZCX_ABAPGIT_EXCEPTION']()).constructor_({msgv1: abap.CharacterFactory.get(1, 'x')}));
    await this.#mi_cut.get().zif_abapgit_log$add_exception({ix_exc: lo_x});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mi_cut.get().zif_abapgit_log$get_log_level()), exp: abap.Classes['ZIF_ABAPGIT_LOG'].zif_abapgit_log$c_log_level.get().error});
  }
  async #clone() {
    let li_clone = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_LOG", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_LOG"});
    await this.#mi_cut.get().zif_abapgit_log$add({iv_msg: abap.CharacterFactory.get(5, 'Hello')});
    await this.#mi_cut.get().zif_abapgit_log$set_title({iv_title: abap.CharacterFactory.get(6, 'My log')});
    li_clone.set((await this.#mi_cut.get().zif_abapgit_log$clone()));
    await this.#mi_cut.get().zif_abapgit_log$add({iv_msg: abap.CharacterFactory.get(5, 'World')});
    await this.#mi_cut.get().zif_abapgit_log$set_title({iv_title: abap.CharacterFactory.get(14, 'My log CHANGED')});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await li_clone.get().zif_abapgit_log$count()), exp: abap.IntegerFactory.get(1)});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await li_clone.get().zif_abapgit_log$get_title()), exp: abap.CharacterFactory.get(6, 'My log')});
  }
}
abap.Classes['CLAS-ZCL_ABAPGIT_LOG-LTCL_TEST'] = ltcl_test;
export {ltcl_test};