All files / output zcl_abapgit_syntax_json.clas.testclasses.mjs

100% Statements 46/46
90% Branches 9/10
88.88% Functions 8/9
100% Lines 46/46

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 461x 1x 1x 1x 3x 3x 3x 3x 3x 3x 1x 1x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 1x 1x 3x 1x 1x 3x 1x 1x 3x 1x 1x
const {zcl_abapgit_syntax_highlighter} = await import("./zcl_abapgit_syntax_highlighter.clas.mjs");
const {zcl_abapgit_syntax_json} = await import("./zcl_abapgit_syntax_json.clas.mjs");
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_syntax_json.clas.testclasses.abap
class ltcl_abapgit_syntax_json {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CLAS-ZCL_ABAPGIT_SYNTAX_JSON-LTCL_ABAPGIT_SYNTAX_JSON';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {"MO_CUT": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_SYNTAX_JSON", RTTIName: "\\CLASS=ZCL_ABAPGIT_SYNTAX_JSON"});}, "visibility": "I", "is_constant": " ", "is_class": " "}};
  static METHODS = {"SETUP": {"visibility": "I", "parameters": {}},
  "KEY_VALUE": {"visibility": "I", "parameters": {}},
  "COMMENT_1": {"visibility": "I", "parameters": {}},
  "COMMENT_2": {"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),
      "key_value": this.#key_value.bind(this),
      "comment_1": this.#comment_1.bind(this),
      "comment_2": this.#comment_2.bind(this),
    };
    this.#mo_cut = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_SYNTAX_JSON", RTTIName: "\\CLASS=ZCL_ABAPGIT_SYNTAX_JSON"});
    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_SYNTAX_JSON']()).constructor_());
  }
  async #key_value() {
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mo_cut.get().process_line({iv_line: new abap.types.String().set(`"key":"value"`)})), exp: new abap.types.String().set(`<span class="text">"key"</span>:<span class="properties">"value"</span>`)});
  }
  async #comment_1() {
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mo_cut.get().process_line({iv_line: new abap.types.String().set(`"key":"value" // comment`)})), exp: abap.operators.concat(new abap.types.String().set(`<span class="text">"key"</span>:<span class="properties">"value"</span>`),new abap.types.String().set(` <span class="comment">//</span> comment`))});
  }
  async #comment_2() {
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: (await this.#mo_cut.get().process_line({iv_line: new abap.types.String().set(`/* comment */`)})), exp: new abap.types.String().set(`<span class="comment">/* comment */</span>`)});
  }
}
abap.Classes['CLAS-ZCL_ABAPGIT_SYNTAX_JSON-LTCL_ABAPGIT_SYNTAX_JSON'] = ltcl_abapgit_syntax_json;
export {ltcl_abapgit_syntax_json};