All files / output zcx_abapgit_exception.clas.testclasses.mjs

78.72% Statements 603/766
83.09% Branches 59/71
72.72% Functions 56/77
78.72% Lines 603/766

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 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 7661x 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 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 16x 1x 16x 16x 16x 1x 8x 8x 1x 8x 8x 8x 8x               8x 8x 8x 1x 5x 5x 5x 1x 5x 5x 5x 1x 9x 9x 9x               9x 9x 1x 2x 2x 2x 2x 2x 1x 5x 5x   5x 5x 5x 5x     5x 5x 1x 9x 9x   9x 9x 9x 9x     9x 9x 1x 2x 2x   2x 2x 2x 2x     2x 2x 1x 15x 15x 15x 1x 5x 5x 5x 1x 2x 2x 2x 2x 2x 1x 16x 16x 16x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 1x 3x 3x 3x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 8x 8x 8x 8x 8x                                                                                                                               8x 8x 1x 1x 1x 1x 1x 1x 1x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 1x 1x 1x 1x 8x 1x 1x 1x 1x 8x 1x 1x 1x 1x 8x 1x 1x 1x 1x 8x 1x 1x 1x 1x 8x 1x 1x 1x 1x 8x 1x 1x 1x 1x 8x 1x 1x 1x 1x 8x     8x 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 8x 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 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 1x 5x 5x 5x 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 5x 5x 1x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 1x 1x 1x 1x 1x 1x 1x 5x 5x 5x 5x 5x                     5x 5x 1x 1x 1x 1x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 5x 1x 1x 1x 1x 1x 1x 5x 1x 1x 1x 1x 1x 1x 5x 1x 1x 1x 1x 1x 1x 5x 1x 1x 1x 1x 1x 5x 1x 1x 1x 1x 1x 1x 1x 1x 1x 5x     5x 1x 1x 1x 1x 1x 5x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x
const {cx_static_check} = await import("./cx_static_check.clas.mjs");
const {zcx_abapgit_exception} = await import("./zcx_abapgit_exception.clas.mjs");
const {cx_root} = await import("./cx_root.clas.mjs");
// zcx_abapgit_exception.clas.testclasses.abap
 
 
 
class ltcl_base {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CLAS-ZCX_ABAPGIT_EXCEPTION-LTCL_BASE';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {"MO_CUT": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCX_ABAPGIT_EXCEPTION", RTTIName: "\\CLASS=ZCX_ABAPGIT_EXCEPTION"});}, "visibility": "O", "is_constant": " ", "is_class": " "},
  "MS_GIVEN": {"type": () => {return new abap.types.Structure({
  "text": new abap.types.String({qualifiedName: "STRING"}),
  "t100_message": new abap.types.Structure({
  "msgty": new abap.types.Character(1, {}),
  "msgid": new abap.types.Character(20, {}),
  "msgno": new abap.types.Numc({length: 3}),
  "msgv1": new abap.types.Character(50, {}),
  "msgv2": new abap.types.Character(50, {}),
  "msgv3": new abap.types.Character(50, {}),
  "msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}),
  "longtext": new abap.types.String({qualifiedName: "STRING"}),
  "previous_exception": new abap.types.ABAPObject({qualifiedName: "CX_ROOT", RTTIName: "\\CLASS=CX_ROOT"})}, undefined, undefined, {}, {});}, "visibility": "O", "is_constant": " ", "is_class": " "},
  "GS_TEST_DATA": {"type": () => {return new abap.types.Structure({
  "text": new abap.types.String({qualifiedName: "STRING"}),
  "empty_text": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {});}, "visibility": "O", "is_constant": "X", "is_class": "X"}};
  static METHODS = {"TEARDOWN": {"visibility": "I", "parameters": {}},
  "GIVEN_THE_TEXT": {"visibility": "O", "parameters": {"IV_TEXT": {"type": () => {return new abap.types.Character();}, "is_optional": " "}}},
  "GIVEN_THE_LONGTEXT": {"visibility": "O", "parameters": {"IV_LONGTEXT": {"type": () => {return new abap.types.Character();}, "is_optional": " "}}},
  "GIVEN_THE_T100_MESSAGE": {"visibility": "O", "parameters": {"IS_MESSAGE": {"type": () => {return new abap.types.Structure({
  "msgty": new abap.types.Character(1, {}),
  "msgid": new abap.types.Character(20, {}),
  "msgno": new abap.types.Numc({length: 3}),
  "msgv1": new abap.types.Character(50, {}),
  "msgv2": new abap.types.Character(50, {}),
  "msgv3": new abap.types.Character(50, {}),
  "msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {});}, "is_optional": " "}}},
  "GIVEN_THE_PREVIOUS_EXCEPTION": {"visibility": "O", "parameters": {"IX_PREVIOUS_EXCEPTION": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CX_ROOT", RTTIName: "\\CLASS=CX_ROOT"});}, "is_optional": " "}}},
  "WHEN_INSTANTIATED_USING_RAISE": {"visibility": "O", "parameters": {}},
  "WHEN_INSTAN_USING_RAISE_T100": {"visibility": "O", "parameters": {}},
  "WHEN_INST_USNG_RAISE_WITH_TEXT": {"visibility": "O", "parameters": {}},
  "THEN_THE_TEXT_SHOULD_EQUAL": {"visibility": "O", "parameters": {"IV_TEXT": {"type": () => {return new abap.types.Character();}, "is_optional": " "}}},
  "THEN_THE_LONGTEXT_SHOULD_EQUAL": {"visibility": "O", "parameters": {"IV_LONGTEXT": {"type": () => {return new abap.types.Character();}, "is_optional": " "}}},
  "THEN_THE_PREV_EXC_SHOULD_EQUAL": {"visibility": "O", "parameters": {"IX_EXCEPTION": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CX_ROOT", RTTIName: "\\CLASS=CX_ROOT"});}, "is_optional": " "}}},
  "GET_T100_TEXT": {"visibility": "U", "parameters": {"RV_TEXT": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "IS_MESSAGE": {"type": () => {return new abap.types.Structure({
  "msgty": new abap.types.Character(1, {}),
  "msgid": new abap.types.Character(20, {}),
  "msgno": new abap.types.Numc({length: 3}),
  "msgv1": new abap.types.Character(50, {}),
  "msgv2": new abap.types.Character(50, {}),
  "msgv3": new abap.types.Character(50, {}),
  "msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {});}, "is_optional": " "}}}};
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "teardown": this.#teardown.bind(this),
      "given_the_text": this.given_the_text.bind(this),
      "given_the_longtext": this.given_the_longtext.bind(this),
      "given_the_t100_message": this.given_the_t100_message.bind(this),
      "given_the_previous_exception": this.given_the_previous_exception.bind(this),
      "when_instantiated_using_raise": this.when_instantiated_using_raise.bind(this),
      "when_instan_using_raise_t100": this.when_instan_using_raise_t100.bind(this),
      "when_inst_usng_raise_with_text": this.when_inst_usng_raise_with_text.bind(this),
      "then_the_text_should_equal": this.then_the_text_should_equal.bind(this),
      "then_the_longtext_should_equal": this.then_the_longtext_should_equal.bind(this),
      "then_the_prev_exc_should_equal": this.then_the_prev_exc_should_equal.bind(this),
    };
    this.mo_cut = new abap.types.ABAPObject({qualifiedName: "ZCX_ABAPGIT_EXCEPTION", RTTIName: "\\CLASS=ZCX_ABAPGIT_EXCEPTION"});
    this.ms_given = new abap.types.Structure({
    "text": new abap.types.String({qualifiedName: "STRING"}),
    "t100_message": new abap.types.Structure({
    "msgty": new abap.types.Character(1, {}),
    "msgid": new abap.types.Character(20, {}),
    "msgno": new abap.types.Numc({length: 3}),
    "msgv1": new abap.types.Character(50, {}),
    "msgv2": new abap.types.Character(50, {}),
    "msgv3": new abap.types.Character(50, {}),
    "msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}),
    "longtext": new abap.types.String({qualifiedName: "STRING"}),
    "previous_exception": new abap.types.ABAPObject({qualifiedName: "CX_ROOT", RTTIName: "\\CLASS=CX_ROOT"})}, undefined, undefined, {}, {});
    this.gs_test_data = ltcl_base.gs_test_data;
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async get_t100_text(INPUT) {
    return ltcl_base.get_t100_text(INPUT);
  }
  static async get_t100_text(INPUT) {
    let rv_text = new abap.types.String({qualifiedName: "STRING"});
    let is_message = INPUT?.is_message;
    if (is_message?.getQualifiedName === undefined || is_message.getQualifiedName() !== "SYMSG") { is_message = undefined; }
    if (is_message === undefined) { is_message = new abap.types.Structure({
    "msgty": new abap.types.Character(1, {}),
    "msgid": new abap.types.Character(20, {}),
    "msgno": new abap.types.Numc({length: 3}),
    "msgv1": new abap.types.Character(50, {}),
    "msgv2": new abap.types.Character(50, {}),
    "msgv3": new abap.types.Character(50, {}),
    "msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}).set(INPUT.is_message); }
    await abap.statements.message({into: rv_text, id: is_message.get().msgid, type: abap.CharacterFactory.get(1, 'S'), number: is_message.get().msgno, with: [is_message.get().msgv1,is_message.get().msgv2,is_message.get().msgv3,is_message.get().msgv4]});
    return rv_text;
  }
  async given_the_text(INPUT) {
    let iv_text = INPUT?.iv_text;
    this.ms_given.get().text.set(iv_text);
  }
  async given_the_longtext(INPUT) {
    let iv_longtext = INPUT?.iv_longtext;
    this.ms_given.get().longtext.set(iv_longtext);
  }
  async given_the_t100_message(INPUT) {
    let is_message = INPUT?.is_message;
    if (is_message?.getQualifiedName === undefined || is_message.getQualifiedName() !== "SYMSG") { is_message = undefined; }
    if (is_message === undefined) { is_message = new abap.types.Structure({
    "msgty": new abap.types.Character(1, {}),
    "msgid": new abap.types.Character(20, {}),
    "msgno": new abap.types.Numc({length: 3}),
    "msgv1": new abap.types.Character(50, {}),
    "msgv2": new abap.types.Character(50, {}),
    "msgv3": new abap.types.Character(50, {}),
    "msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}).set(INPUT.is_message); }
    this.ms_given.get().t100_message.set(is_message);
  }
  async given_the_previous_exception(INPUT) {
    let ix_previous_exception = INPUT?.ix_previous_exception;
    if (ix_previous_exception?.getQualifiedName === undefined || ix_previous_exception.getQualifiedName() !== "CX_ROOT") { ix_previous_exception = undefined; }
    if (ix_previous_exception === undefined) { ix_previous_exception = new abap.types.ABAPObject({qualifiedName: "CX_ROOT", RTTIName: "\\CLASS=CX_ROOT"}).set(INPUT.ix_previous_exception); }
    this.ms_given.get().previous_exception.set(ix_previous_exception);
  }
  async when_instantiated_using_raise() {
    try {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: this.ms_given.get().text, ix_previous: this.ms_given.get().previous_exception, iv_longtext: this.ms_given.get().longtext});
      await abap.Classes['CL_ABAP_UNIT_ASSERT'].fail();
    } catch (e) {
      if ((abap.Classes['ZCX_ABAPGIT_EXCEPTION'] && e instanceof abap.Classes['ZCX_ABAPGIT_EXCEPTION'])) {
        this.mo_cut.set(e);
      } else {
        throw e;
      }
    }
  }
  async when_instan_using_raise_t100() {
    try {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise_t100({iv_msgid: this.ms_given.get().t100_message.get().msgid, iv_msgno: this.ms_given.get().t100_message.get().msgno, iv_msgv1: this.ms_given.get().t100_message.get().msgv1, iv_msgv2: this.ms_given.get().t100_message.get().msgv2, iv_msgv3: this.ms_given.get().t100_message.get().msgv3, iv_msgv4: this.ms_given.get().t100_message.get().msgv4, ix_previous: this.ms_given.get().previous_exception, iv_longtext: this.ms_given.get().longtext});
      await abap.Classes['CL_ABAP_UNIT_ASSERT'].fail();
    } catch (e) {
      if ((abap.Classes['ZCX_ABAPGIT_EXCEPTION'] && e instanceof abap.Classes['ZCX_ABAPGIT_EXCEPTION'])) {
        this.mo_cut.set(e);
      } else {
        throw e;
      }
    }
  }
  async when_inst_usng_raise_with_text() {
    try {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise_with_text({ix_previous: this.ms_given.get().previous_exception, iv_longtext: this.ms_given.get().longtext});
      await abap.Classes['CL_ABAP_UNIT_ASSERT'].fail();
    } catch (e) {
      if ((abap.Classes['ZCX_ABAPGIT_EXCEPTION'] && e instanceof abap.Classes['ZCX_ABAPGIT_EXCEPTION'])) {
        this.mo_cut.set(e);
      } else {
        throw e;
      }
    }
  }
  async then_the_text_should_equal(INPUT) {
    let iv_text = INPUT?.iv_text;
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({exp: iv_text, act: (await this.mo_cut.get().if_message$get_text())});
  }
  async then_the_longtext_should_equal(INPUT) {
    let iv_longtext = INPUT?.iv_longtext;
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({exp: iv_longtext, act: (await this.mo_cut.get().if_message$get_longtext({preserve_newlines: abap.builtin.abap_true}))});
  }
  async then_the_prev_exc_should_equal(INPUT) {
    let ix_exception = INPUT?.ix_exception;
    if (ix_exception?.getQualifiedName === undefined || ix_exception.getQualifiedName() !== "CX_ROOT") { ix_exception = undefined; }
    if (ix_exception === undefined) { ix_exception = new abap.types.ABAPObject({qualifiedName: "CX_ROOT", RTTIName: "\\CLASS=CX_ROOT"}).set(INPUT.ix_exception); }
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({exp: ix_exception, act: this.mo_cut.get().previous});
  }
  async #teardown() {
    this.ms_given.clear();
    this.mo_cut.clear();
  }
}
abap.Classes['CLAS-ZCX_ABAPGIT_EXCEPTION-LTCL_BASE'] = ltcl_base;
ltcl_base.gs_test_data = new abap.types.Structure({
"text": new abap.types.String({qualifiedName: "STRING"}),
"empty_text": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {});
ltcl_base.gs_test_data.get().text.set(`This is a test error message.`);
ltcl_base.gs_test_data.get().empty_text.set(``);
class ltcl_general extends ltcl_base {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CLAS-ZCX_ABAPGIT_EXCEPTION-LTCL_GENERAL';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {};
  static METHODS = {"DIRECT_TEXT": {"visibility": "U", "parameters": {}},
  "NO_TEXT": {"visibility": "U", "parameters": {}},
  "TEXT_FROM_EXCEPTION": {"visibility": "U", "parameters": {}}};
  constructor() {
    const sup = super();
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "SUPER": sup.FRIENDS_ACCESS_INSTANCE,
      "direct_text": this.direct_text.bind(this),
      "no_text": this.no_text.bind(this),
      "text_from_exception": this.text_from_exception.bind(this),
    };
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async direct_text() {
    await this.given_the_text({iv_text: ltcl_general.gs_test_data.get().text});
    await this.when_instantiated_using_raise();
    await this.then_the_text_should_equal({iv_text: ltcl_general.gs_test_data.get().text});
  }
  async no_text() {
    await this.given_the_text({iv_text: ltcl_general.gs_test_data.get().empty_text});
    await this.when_instantiated_using_raise();
    await this.then_the_text_should_equal({iv_text: abap.Classes['ZCX_ABAPGIT_EXCEPTION'].c_generic_error_msg});
  }
  async text_from_exception() {
    let lx_previous = new abap.types.ABAPObject({qualifiedName: "CX_SY_DYN_CALL_ILLEGAL_METHOD", RTTIName: "\\CLASS=CX_SY_DYN_CALL_ILLEGAL_METHOD"});
    lx_previous.set(await (new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_METHOD']()).constructor_({textid: abap.Classes['CX_SY_DYN_CALL_ILLEGAL_METHOD'].private_method, classname: abap.CharacterFactory.get(5, 'CLASS'), methodname: abap.CharacterFactory.get(6, 'METHOD')}));
    await this.given_the_previous_exception({ix_previous_exception: lx_previous});
    await this.when_inst_usng_raise_with_text();
    await this.then_the_text_should_equal({iv_text: (await lx_previous.get().if_message$get_text())});
    await this.then_the_prev_exc_should_equal({ix_exception: lx_previous});
  }
}
abap.Classes['CLAS-ZCX_ABAPGIT_EXCEPTION-LTCL_GENERAL'] = ltcl_general;
class ltcl_t100 extends ltcl_base {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CLAS-ZCX_ABAPGIT_EXCEPTION-LTCL_T100';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {"GS_T100_TEST_DATA": {"type": () => {return new abap.types.Structure({
  "message1": new abap.types.Structure({
  "msgty": new abap.types.Character(1, {}),
  "msgid": new abap.types.Character(20, {}),
  "msgno": new abap.types.Numc({length: 3}),
  "msgv1": new abap.types.Character(50, {}),
  "msgv2": new abap.types.Character(50, {}),
  "msgv3": new abap.types.Character(50, {}),
  "msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}),
  "message2": new abap.types.Structure({
  "msgty": new abap.types.Character(1, {}),
  "msgid": new abap.types.Character(20, {}),
  "msgno": new abap.types.Numc({length: 3}),
  "msgv1": new abap.types.Character(50, {}),
  "msgv2": new abap.types.Character(50, {}),
  "msgv3": new abap.types.Character(50, {}),
  "msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}),
  "message3": new abap.types.Structure({
  "msgty": new abap.types.Character(1, {}),
  "msgid": new abap.types.Character(20, {}),
  "msgno": new abap.types.Numc({length: 3}),
  "msgv1": new abap.types.Character(50, {}),
  "msgv2": new abap.types.Character(50, {}),
  "msgv3": new abap.types.Character(50, {}),
  "msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}),
  "message4": new abap.types.Structure({
  "msgty": new abap.types.Character(1, {}),
  "msgid": new abap.types.Character(20, {}),
  "msgno": new abap.types.Numc({length: 3}),
  "msgv1": new abap.types.Character(50, {}),
  "msgv2": new abap.types.Character(50, {}),
  "msgv3": new abap.types.Character(50, {}),
  "msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}),
  "message5": new abap.types.Structure({
  "msgty": new abap.types.Character(1, {}),
  "msgid": new abap.types.Character(20, {}),
  "msgno": new abap.types.Numc({length: 3}),
  "msgv1": new abap.types.Character(50, {}),
  "msgv2": new abap.types.Character(50, {}),
  "msgv3": new abap.types.Character(50, {}),
  "msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}),
  "message6": new abap.types.Structure({
  "msgty": new abap.types.Character(1, {}),
  "msgid": new abap.types.Character(20, {}),
  "msgno": new abap.types.Numc({length: 3}),
  "msgv1": new abap.types.Character(50, {}),
  "msgv2": new abap.types.Character(50, {}),
  "msgv3": new abap.types.Character(50, {}),
  "msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}),
  "message7": new abap.types.Structure({
  "msgty": new abap.types.Character(1, {}),
  "msgid": new abap.types.Character(20, {}),
  "msgno": new abap.types.Numc({length: 3}),
  "msgv1": new abap.types.Character(50, {}),
  "msgv2": new abap.types.Character(50, {}),
  "msgv3": new abap.types.Character(50, {}),
  "msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}),
  "message8": new abap.types.Structure({
  "msgty": new abap.types.Character(1, {}),
  "msgid": new abap.types.Character(20, {}),
  "msgno": new abap.types.Numc({length: 3}),
  "msgv1": new abap.types.Character(50, {}),
  "msgv2": new abap.types.Character(50, {}),
  "msgv3": new abap.types.Character(50, {}),
  "msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {})}, undefined, undefined, {}, {});}, "visibility": "I", "is_constant": " ", "is_class": "X"}};
  static METHODS = {"CLASS_SETUP": {"visibility": "I", "parameters": {}},
  "TEXT1": {"visibility": "U", "parameters": {}},
  "TEXT2": {"visibility": "U", "parameters": {}},
  "TEXT3": {"visibility": "U", "parameters": {}},
  "TEXT4": {"visibility": "U", "parameters": {}},
  "TEXT5": {"visibility": "U", "parameters": {}},
  "TEXT6": {"visibility": "U", "parameters": {}},
  "TEXT7": {"visibility": "U", "parameters": {}},
  "TEXT8": {"visibility": "U", "parameters": {}}};
  #gs_t100_test_data;
  constructor() {
    const sup = super();
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "SUPER": sup.FRIENDS_ACCESS_INSTANCE,
      "text1": this.text1.bind(this),
      "text2": this.text2.bind(this),
      "text3": this.text3.bind(this),
      "text4": this.text4.bind(this),
      "text5": this.text5.bind(this),
      "text6": this.text6.bind(this),
      "text7": this.text7.bind(this),
      "text8": this.text8.bind(this),
    };
    this.gs_t100_test_data = ltcl_t100.gs_t100_test_data;
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async text1() {
    await this.given_the_t100_message({is_message: ltcl_t100.gs_t100_test_data.get().message1});
    await this.when_instan_using_raise_t100();
    await this.then_the_text_should_equal({iv_text: (await this.get_t100_text({is_message: ltcl_t100.gs_t100_test_data.get().message1}))});
  }
  async text2() {
    await this.given_the_t100_message({is_message: ltcl_t100.gs_t100_test_data.get().message2});
    await this.when_instan_using_raise_t100();
    await this.then_the_text_should_equal({iv_text: (await this.get_t100_text({is_message: ltcl_t100.gs_t100_test_data.get().message2}))});
  }
  async text3() {
    await this.given_the_t100_message({is_message: ltcl_t100.gs_t100_test_data.get().message3});
    await this.when_instan_using_raise_t100();
    await this.then_the_text_should_equal({iv_text: (await this.get_t100_text({is_message: ltcl_t100.gs_t100_test_data.get().message3}))});
  }
  async text4() {
    await this.given_the_t100_message({is_message: ltcl_t100.gs_t100_test_data.get().message4});
    await this.when_instan_using_raise_t100();
    await this.then_the_text_should_equal({iv_text: (await this.get_t100_text({is_message: ltcl_t100.gs_t100_test_data.get().message4}))});
  }
  async text5() {
    await this.given_the_t100_message({is_message: ltcl_t100.gs_t100_test_data.get().message5});
    await this.when_instan_using_raise_t100();
    await this.then_the_text_should_equal({iv_text: (await this.get_t100_text({is_message: ltcl_t100.gs_t100_test_data.get().message5}))});
  }
  async text6() {
    await this.given_the_t100_message({is_message: ltcl_t100.gs_t100_test_data.get().message6});
    await this.when_instan_using_raise_t100();
    await this.then_the_text_should_equal({iv_text: (await this.get_t100_text({is_message: ltcl_t100.gs_t100_test_data.get().message6}))});
  }
  async text7() {
    await this.given_the_t100_message({is_message: ltcl_t100.gs_t100_test_data.get().message7});
    await this.when_instan_using_raise_t100();
    await this.then_the_text_should_equal({iv_text: (await this.get_t100_text({is_message: ltcl_t100.gs_t100_test_data.get().message7}))});
  }
  async text8() {
    await this.given_the_t100_message({is_message: ltcl_t100.gs_t100_test_data.get().message8});
    await this.when_instan_using_raise_t100();
    await this.then_the_text_should_equal({iv_text: (await this.get_t100_text({is_message: ltcl_t100.gs_t100_test_data.get().message8}))});
  }
  async class_setup() {
    return ltcl_t100.class_setup();
  }
  static async class_setup() {
    ltcl_t100.gs_t100_test_data.get().message1.get().msgid.set(abap.CharacterFactory.get(2, '00'));
    ltcl_t100.gs_t100_test_data.get().message1.get().msgno.set(abap.CharacterFactory.get(3, '001'));
    ltcl_t100.gs_t100_test_data.get().message2.get().msgid.set(abap.CharacterFactory.get(2, '00'));
    ltcl_t100.gs_t100_test_data.get().message2.get().msgno.set(abap.CharacterFactory.get(3, '001'));
    ltcl_t100.gs_t100_test_data.get().message2.get().msgv1.set(abap.CharacterFactory.get(10, 'Variable 1'));
    ltcl_t100.gs_t100_test_data.get().message3.get().msgid.set(abap.CharacterFactory.get(2, '00'));
    ltcl_t100.gs_t100_test_data.get().message3.get().msgno.set(abap.CharacterFactory.get(3, '001'));
    ltcl_t100.gs_t100_test_data.get().message3.get().msgv1.set(abap.CharacterFactory.get(10, 'Variable 1'));
    ltcl_t100.gs_t100_test_data.get().message3.get().msgv2.set(abap.CharacterFactory.get(10, 'Variable 2'));
    ltcl_t100.gs_t100_test_data.get().message4.get().msgid.set(abap.CharacterFactory.get(2, '00'));
    ltcl_t100.gs_t100_test_data.get().message4.get().msgno.set(abap.CharacterFactory.get(3, '001'));
    ltcl_t100.gs_t100_test_data.get().message4.get().msgv1.set(abap.CharacterFactory.get(10, 'Variable 1'));
    ltcl_t100.gs_t100_test_data.get().message4.get().msgv2.set(abap.CharacterFactory.get(10, 'Variable 2'));
    ltcl_t100.gs_t100_test_data.get().message4.get().msgv3.set(abap.CharacterFactory.get(10, 'Variable 3'));
    ltcl_t100.gs_t100_test_data.get().message5.get().msgid.set(abap.CharacterFactory.get(2, '00'));
    ltcl_t100.gs_t100_test_data.get().message5.get().msgno.set(abap.CharacterFactory.get(3, '001'));
    ltcl_t100.gs_t100_test_data.get().message5.get().msgv1.set(abap.CharacterFactory.get(10, 'Variable 1'));
    ltcl_t100.gs_t100_test_data.get().message5.get().msgv2.set(abap.CharacterFactory.get(10, 'Variable 2'));
    ltcl_t100.gs_t100_test_data.get().message5.get().msgv3.set(abap.CharacterFactory.get(10, 'Variable 3'));
    ltcl_t100.gs_t100_test_data.get().message5.get().msgv4.set(abap.CharacterFactory.get(10, 'Variable 4'));
    ltcl_t100.gs_t100_test_data.get().message6.get().msgid.set(abap.CharacterFactory.get(2, '00'));
    ltcl_t100.gs_t100_test_data.get().message6.get().msgno.set(abap.CharacterFactory.get(3, '003'));
    ltcl_t100.gs_t100_test_data.get().message6.get().msgv1.set(abap.CharacterFactory.get(10, 'Variable 1'));
    ltcl_t100.gs_t100_test_data.get().message6.get().msgv2.set(abap.CharacterFactory.get(10, 'Variable 2'));
    ltcl_t100.gs_t100_test_data.get().message6.get().msgv3.set(abap.CharacterFactory.get(10, 'Variable 3'));
    ltcl_t100.gs_t100_test_data.get().message6.get().msgv4.set(abap.CharacterFactory.get(10, 'Variable 4'));
    ltcl_t100.gs_t100_test_data.get().message7.get().msgid.set(abap.CharacterFactory.get(2, '00'));
    ltcl_t100.gs_t100_test_data.get().message7.get().msgno.set(abap.CharacterFactory.get(3, '003'));
    ltcl_t100.gs_t100_test_data.get().message8.get().msgid.set(abap.CharacterFactory.get(2, '00'));
    ltcl_t100.gs_t100_test_data.get().message8.get().msgno.set(abap.CharacterFactory.get(3, '002'));
  }
}
abap.Classes['CLAS-ZCX_ABAPGIT_EXCEPTION-LTCL_T100'] = ltcl_t100;
ltcl_t100.gs_t100_test_data = new abap.types.Structure({
"message1": new abap.types.Structure({
"msgty": new abap.types.Character(1, {}),
"msgid": new abap.types.Character(20, {}),
"msgno": new abap.types.Numc({length: 3}),
"msgv1": new abap.types.Character(50, {}),
"msgv2": new abap.types.Character(50, {}),
"msgv3": new abap.types.Character(50, {}),
"msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}),
"message2": new abap.types.Structure({
"msgty": new abap.types.Character(1, {}),
"msgid": new abap.types.Character(20, {}),
"msgno": new abap.types.Numc({length: 3}),
"msgv1": new abap.types.Character(50, {}),
"msgv2": new abap.types.Character(50, {}),
"msgv3": new abap.types.Character(50, {}),
"msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}),
"message3": new abap.types.Structure({
"msgty": new abap.types.Character(1, {}),
"msgid": new abap.types.Character(20, {}),
"msgno": new abap.types.Numc({length: 3}),
"msgv1": new abap.types.Character(50, {}),
"msgv2": new abap.types.Character(50, {}),
"msgv3": new abap.types.Character(50, {}),
"msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}),
"message4": new abap.types.Structure({
"msgty": new abap.types.Character(1, {}),
"msgid": new abap.types.Character(20, {}),
"msgno": new abap.types.Numc({length: 3}),
"msgv1": new abap.types.Character(50, {}),
"msgv2": new abap.types.Character(50, {}),
"msgv3": new abap.types.Character(50, {}),
"msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}),
"message5": new abap.types.Structure({
"msgty": new abap.types.Character(1, {}),
"msgid": new abap.types.Character(20, {}),
"msgno": new abap.types.Numc({length: 3}),
"msgv1": new abap.types.Character(50, {}),
"msgv2": new abap.types.Character(50, {}),
"msgv3": new abap.types.Character(50, {}),
"msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}),
"message6": new abap.types.Structure({
"msgty": new abap.types.Character(1, {}),
"msgid": new abap.types.Character(20, {}),
"msgno": new abap.types.Numc({length: 3}),
"msgv1": new abap.types.Character(50, {}),
"msgv2": new abap.types.Character(50, {}),
"msgv3": new abap.types.Character(50, {}),
"msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}),
"message7": new abap.types.Structure({
"msgty": new abap.types.Character(1, {}),
"msgid": new abap.types.Character(20, {}),
"msgno": new abap.types.Numc({length: 3}),
"msgv1": new abap.types.Character(50, {}),
"msgv2": new abap.types.Character(50, {}),
"msgv3": new abap.types.Character(50, {}),
"msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {}),
"message8": new abap.types.Structure({
"msgty": new abap.types.Character(1, {}),
"msgid": new abap.types.Character(20, {}),
"msgno": new abap.types.Numc({length: 3}),
"msgv1": new abap.types.Character(50, {}),
"msgv2": new abap.types.Character(50, {}),
"msgv3": new abap.types.Character(50, {}),
"msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {})}, undefined, undefined, {}, {});
class ltcl_get_t100_longtext {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CLAS-ZCX_ABAPGIT_EXCEPTION-LTCL_GET_T100_LONGTEXT';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {};
  static METHODS = {"TEST01": {"visibility": "U", "parameters": {}}};
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "test01": this.test01.bind(this),
    };
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async test01() {
    let lx_err = new abap.types.ABAPObject({qualifiedName: "ZCX_ABAPGIT_EXCEPTION", RTTIName: "\\CLASS=ZCX_ABAPGIT_EXCEPTION"});
    let lv_result = new abap.types.String({qualifiedName: "STRING"});
    try {
      await abap.statements.message({into: abap.Classes['ZCX_ABAPGIT_EXCEPTION'].null, id: "00", number: "058", type: "E", with: [abap.CharacterFactory.get(7, 'Value_1'),abap.CharacterFactory.get(7, 'Value_2'),abap.CharacterFactory.get(7, 'Value_3'),abap.CharacterFactory.get(7, 'Value_4')]});
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise_t100();
    } catch (e) {
      if ((abap.Classes['ZCX_ABAPGIT_EXCEPTION'] && e instanceof abap.Classes['ZCX_ABAPGIT_EXCEPTION'])) {
        lx_err.set(e);
        lv_result.set((await lx_err.get().if_message$get_longtext()));
      } else {
        throw e;
      }
    }
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_not_initial({act: lv_result});
    if (abap.compare.ns(lv_result, abap.CharacterFactory.get(7, 'Value_1'))) {
      await abap.Classes['CL_ABAP_UNIT_ASSERT'].fail();
    }
    if (abap.compare.ns(lv_result, abap.CharacterFactory.get(7, 'Value_2'))) {
      await abap.Classes['CL_ABAP_UNIT_ASSERT'].fail();
    }
    if (abap.compare.ns(lv_result, abap.CharacterFactory.get(7, 'Value_3'))) {
      await abap.Classes['CL_ABAP_UNIT_ASSERT'].fail();
    }
    if (abap.compare.ns(lv_result, abap.CharacterFactory.get(7, 'Value_4'))) {
      await abap.Classes['CL_ABAP_UNIT_ASSERT'].fail();
    }
  }
}
abap.Classes['CLAS-ZCX_ABAPGIT_EXCEPTION-LTCL_GET_T100_LONGTEXT'] = ltcl_get_t100_longtext;
class ltcl_split_text {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CLAS-ZCX_ABAPGIT_EXCEPTION-LTCL_SPLIT_TEXT';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {};
  static METHODS = {"TEST_SET_MSG_VARS": {"visibility": "I", "parameters": {"IV_TEXT": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "IS_MSG": {"type": () => {return new abap.types.Structure({
  "v1": new abap.types.Character(50, {"qualifiedName":"sy-msgv1"}),
  "v2": new abap.types.Character(50, {"qualifiedName":"sy-msgv2"}),
  "v3": new abap.types.Character(50, {"qualifiedName":"sy-msgv3"}),
  "v4": new abap.types.Character(50, {"qualifiedName":"sy-msgv4"})}, "ltcl_split_text=>ty_msg", undefined, {}, {});}, "is_optional": " "}}},
  "TEST_SET_MSG_B": {"visibility": "U", "parameters": {}},
  "TEST_SET_MSG_C": {"visibility": "U", "parameters": {}},
  "TEST_SET_MSG_D": {"visibility": "U", "parameters": {}},
  "TEST_SET_MSG_E": {"visibility": "U", "parameters": {}},
  "TEST_SET_MSG_Z": {"visibility": "U", "parameters": {}}};
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "test_set_msg_b": this.test_set_msg_b.bind(this),
      "test_set_msg_c": this.test_set_msg_c.bind(this),
      "test_set_msg_d": this.test_set_msg_d.bind(this),
      "test_set_msg_e": this.test_set_msg_e.bind(this),
      "test_set_msg_z": this.test_set_msg_z.bind(this),
    };
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async test_set_msg_b() {
    let lc_text_b = new abap.types.String({qualifiedName: "STRING"});
    lc_text_b.set('0123456789012345678901234567890123456789012345678 0123456789');
    let lc_msg_b = new abap.types.Structure({
    "v1": new abap.types.Character(50, {"qualifiedName":"sy-msgv1"}),
    "v2": new abap.types.Character(50, {"qualifiedName":"sy-msgv2"}),
    "v3": new abap.types.Character(50, {"qualifiedName":"sy-msgv3"}),
    "v4": new abap.types.Character(50, {"qualifiedName":"sy-msgv4"})}, undefined, undefined, {}, {});
    lc_msg_b.get().v1.set(abap.CharacterFactory.get(49, '0123456789012345678901234567890123456789012345678'));
    lc_msg_b.get().v2.set(abap.CharacterFactory.get(11, ' 0123456789'));
    lc_msg_b.get().v3.set(abap.CharacterFactory.get(1, ''));
    lc_msg_b.get().v4.set(abap.CharacterFactory.get(1, ''));
    await this.test_set_msg_vars({iv_text: lc_text_b, is_msg: lc_msg_b});
  }
  async test_set_msg_c() {
    let lc_text_c = new abap.types.String({qualifiedName: "STRING"});
    lc_text_c.set('01234567890123456789012345678901234567890123456789 123456789');
    let lc_msg_c = new abap.types.Structure({
    "v1": new abap.types.Character(50, {"qualifiedName":"sy-msgv1"}),
    "v2": new abap.types.Character(50, {"qualifiedName":"sy-msgv2"}),
    "v3": new abap.types.Character(50, {"qualifiedName":"sy-msgv3"}),
    "v4": new abap.types.Character(50, {"qualifiedName":"sy-msgv4"})}, undefined, undefined, {}, {});
    lc_msg_c.get().v1.set(abap.CharacterFactory.get(50, '01234567890123456789012345678901234567890123456789'));
    lc_msg_c.get().v2.set(abap.CharacterFactory.get(10, ' 123456789'));
    lc_msg_c.get().v3.set(abap.CharacterFactory.get(1, ''));
    lc_msg_c.get().v4.set(abap.CharacterFactory.get(1, ''));
    await this.test_set_msg_vars({iv_text: lc_text_c, is_msg: lc_msg_c});
  }
  async test_set_msg_d() {
    let lc_text_d = new abap.types.String({qualifiedName: "STRING"});
    lc_text_d.set('012345678901234567890123456789012345678901234567890 23456789');
    let lc_msg_d = new abap.types.Structure({
    "v1": new abap.types.Character(50, {"qualifiedName":"sy-msgv1"}),
    "v2": new abap.types.Character(50, {"qualifiedName":"sy-msgv2"}),
    "v3": new abap.types.Character(50, {"qualifiedName":"sy-msgv3"}),
    "v4": new abap.types.Character(50, {"qualifiedName":"sy-msgv4"})}, undefined, undefined, {}, {});
    lc_msg_d.get().v1.set(abap.CharacterFactory.get(50, '01234567890123456789012345678901234567890123456789'));
    lc_msg_d.get().v2.set(abap.CharacterFactory.get(10, '0 23456789'));
    lc_msg_d.get().v3.set(abap.CharacterFactory.get(1, ''));
    lc_msg_d.get().v4.set(abap.CharacterFactory.get(1, ''));
    await this.test_set_msg_vars({iv_text: lc_text_d, is_msg: lc_msg_d});
  }
  async test_set_msg_e() {
    let lc_text_e = new abap.types.String({qualifiedName: "STRING"});
    lc_text_e.set('012345678901234567890123456789012345678901234567890123456789');
    let lc_msg_e = new abap.types.Structure({
    "v1": new abap.types.Character(50, {"qualifiedName":"sy-msgv1"}),
    "v2": new abap.types.Character(50, {"qualifiedName":"sy-msgv2"}),
    "v3": new abap.types.Character(50, {"qualifiedName":"sy-msgv3"}),
    "v4": new abap.types.Character(50, {"qualifiedName":"sy-msgv4"})}, undefined, undefined, {}, {});
    lc_msg_e.get().v1.set(abap.CharacterFactory.get(50, '01234567890123456789012345678901234567890123456789'));
    lc_msg_e.get().v2.set(abap.CharacterFactory.get(10, '0123456789'));
    lc_msg_e.get().v3.set(abap.CharacterFactory.get(1, ''));
    lc_msg_e.get().v4.set(abap.CharacterFactory.get(1, ''));
    await this.test_set_msg_vars({iv_text: lc_text_e, is_msg: lc_msg_e});
  }
  async test_set_msg_z() {
    let lc_text_x = new abap.types.String({qualifiedName: "STRING"});
    lc_text_x.set(`Here is a very long text more than 200 characters and we have to invent `);
    let lc_text_y = new abap.types.String({qualifiedName: "STRING"});
    lc_text_y.set(`a nice story about abapGit to fill this long message. abapGit is simply `);
    let lc_text_z = new abap.types.String({qualifiedName: "STRING"});
    lc_text_z.set(`the greatest! #abapGit #awesome #community #opensource`);
    let lc_msg_z = new abap.types.Structure({
    "v1": new abap.types.Character(50, {"qualifiedName":"sy-msgv1"}),
    "v2": new abap.types.Character(50, {"qualifiedName":"sy-msgv2"}),
    "v3": new abap.types.Character(50, {"qualifiedName":"sy-msgv3"}),
    "v4": new abap.types.Character(50, {"qualifiedName":"sy-msgv4"})}, undefined, undefined, {}, {});
    lc_msg_z.get().v1.set(new abap.types.String().set(`Here is a very long text more than 200 characters`));
    lc_msg_z.get().v2.set(new abap.types.String().set(` and we have to invent a nice story about abapGit`));
    lc_msg_z.get().v3.set(new abap.types.String().set(` to fill this long message. abapGit is simply the`));
    lc_msg_z.get().v4.set(new abap.types.String().set(` greatest! #abapGit #awesome #community #opensourc`));
    await this.test_set_msg_vars({iv_text: abap.operators.concat(lc_text_x,abap.operators.concat(lc_text_y,lc_text_z)), is_msg: lc_msg_z});
  }
  async test_set_msg_vars(INPUT) {
    return ltcl_split_text.test_set_msg_vars(INPUT);
  }
  static async test_set_msg_vars(INPUT) {
    let iv_text = INPUT?.iv_text;
    if (iv_text?.getQualifiedName === undefined || iv_text.getQualifiedName() !== "STRING") { iv_text = undefined; }
    if (iv_text === undefined) { iv_text = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_text); }
    let is_msg = INPUT?.is_msg;
    if (is_msg?.getQualifiedName === undefined || is_msg.getQualifiedName() !== "LTCL_SPLIT_TEXT=>TY_MSG") { is_msg = undefined; }
    if (is_msg === undefined) { is_msg = new abap.types.Structure({
    "v1": new abap.types.Character(50, {"qualifiedName":"sy-msgv1"}),
    "v2": new abap.types.Character(50, {"qualifiedName":"sy-msgv2"}),
    "v3": new abap.types.Character(50, {"qualifiedName":"sy-msgv3"}),
    "v4": new abap.types.Character(50, {"qualifiedName":"sy-msgv4"})}, "ltcl_split_text=>ty_msg", undefined, {}, {}).set(INPUT.is_msg); }
    await abap.Classes['CL_MESSAGE_HELPER'].set_msg_vars_for_clike({text: iv_text});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: abap.builtin.sy.get().msgv1, exp: is_msg.get().v1});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: abap.builtin.sy.get().msgv2, exp: is_msg.get().v2});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: abap.builtin.sy.get().msgv3, exp: is_msg.get().v3});
    await abap.Classes['CL_ABAP_UNIT_ASSERT'].assert_equals({act: abap.builtin.sy.get().msgv4, exp: is_msg.get().v4});
  }
}
abap.Classes['CLAS-ZCX_ABAPGIT_EXCEPTION-LTCL_SPLIT_TEXT'] = ltcl_split_text;
ltcl_split_text.ty_msg = new abap.types.Structure({
"v1": new abap.types.Character(50, {"qualifiedName":"sy-msgv1"}),
"v2": new abap.types.Character(50, {"qualifiedName":"sy-msgv2"}),
"v3": new abap.types.Character(50, {"qualifiedName":"sy-msgv3"}),
"v4": new abap.types.Character(50, {"qualifiedName":"sy-msgv4"})}, "ltcl_split_text=>ty_msg", undefined, {}, {});
class ltcl_longtext extends ltcl_base {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CLAS-ZCX_ABAPGIT_EXCEPTION-LTCL_LONGTEXT';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {"GS_LONGTEXT_TEST_DATA": {"type": () => {return new abap.types.Structure({
  "longtext_500": new abap.types.String({qualifiedName: "STRING"}),
  "longtext_500_multline": new abap.types.String({qualifiedName: "STRING"}),
  "empty_longtext": new abap.types.String({qualifiedName: "STRING"}),
  "t100_with_longtext": new abap.types.Structure({
  "msgty": new abap.types.Character(1, {}),
  "msgid": new abap.types.Character(20, {}),
  "msgno": new abap.types.Numc({length: 3}),
  "msgv1": new abap.types.Character(50, {}),
  "msgv2": new abap.types.Character(50, {}),
  "msgv3": new abap.types.Character(50, {}),
  "msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {})}, undefined, undefined, {}, {});}, "visibility": "I", "is_constant": " ", "is_class": "X"}};
  static METHODS = {"CLASS_SETUP": {"visibility": "I", "parameters": {}},
  "EMPTY_LONGTEXT": {"visibility": "U", "parameters": {}},
  "LONGTEXT": {"visibility": "U", "parameters": {}},
  "MULTILINE_LONGTEXT": {"visibility": "U", "parameters": {}},
  "T100_LONGTEXT_OVERRIDE": {"visibility": "U", "parameters": {}},
  "TEXT_FROM_PREVIOUS_EXCEPTION": {"visibility": "U", "parameters": {}}};
  #gs_longtext_test_data;
  constructor() {
    const sup = super();
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "SUPER": sup.FRIENDS_ACCESS_INSTANCE,
      "empty_longtext": this.empty_longtext.bind(this),
      "longtext": this.longtext.bind(this),
      "multiline_longtext": this.multiline_longtext.bind(this),
      "t100_longtext_override": this.t100_longtext_override.bind(this),
      "text_from_previous_exception": this.text_from_previous_exception.bind(this),
    };
    this.gs_longtext_test_data = ltcl_longtext.gs_longtext_test_data;
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async empty_longtext() {
    await this.given_the_text({iv_text: ltcl_longtext.gs_test_data.get().text});
    await this.given_the_longtext({iv_longtext: ltcl_longtext.gs_longtext_test_data.get().empty_longtext});
    await this.when_instantiated_using_raise();
    await this.then_the_text_should_equal({iv_text: ltcl_longtext.gs_test_data.get().text});
    await this.then_the_longtext_should_equal({iv_longtext: ltcl_longtext.gs_longtext_test_data.get().empty_longtext});
  }
  async longtext() {
    await this.given_the_text({iv_text: ltcl_longtext.gs_test_data.get().text});
    await this.given_the_longtext({iv_longtext: ltcl_longtext.gs_longtext_test_data.get().longtext_500});
    await this.when_instantiated_using_raise();
    await this.then_the_text_should_equal({iv_text: ltcl_longtext.gs_test_data.get().text});
    await this.then_the_longtext_should_equal({iv_longtext: ltcl_longtext.gs_longtext_test_data.get().longtext_500});
  }
  async multiline_longtext() {
    await this.given_the_text({iv_text: ltcl_longtext.gs_test_data.get().text});
    await this.given_the_longtext({iv_longtext: ltcl_longtext.gs_longtext_test_data.get().longtext_500_multline});
    await this.when_instantiated_using_raise();
    await this.then_the_text_should_equal({iv_text: ltcl_longtext.gs_test_data.get().text});
    await this.then_the_longtext_should_equal({iv_longtext: ltcl_longtext.gs_longtext_test_data.get().longtext_500_multline});
  }
  async t100_longtext_override() {
    await this.given_the_longtext({iv_longtext: ltcl_longtext.gs_longtext_test_data.get().longtext_500});
    await this.given_the_t100_message({is_message: ltcl_longtext.gs_longtext_test_data.get().t100_with_longtext});
    await this.when_instan_using_raise_t100();
    await this.then_the_longtext_should_equal({iv_longtext: ltcl_longtext.gs_longtext_test_data.get().longtext_500});
  }
  async text_from_previous_exception() {
    let lx_previous = new abap.types.ABAPObject({qualifiedName: "CX_SY_DYN_CALL_ILLEGAL_METHOD", RTTIName: "\\CLASS=CX_SY_DYN_CALL_ILLEGAL_METHOD"});
    lx_previous.set(await (new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_METHOD']()).constructor_());
    await this.given_the_previous_exception({ix_previous_exception: lx_previous});
    await this.given_the_longtext({iv_longtext: ltcl_longtext.gs_longtext_test_data.get().longtext_500});
    await this.when_inst_usng_raise_with_text();
    await this.then_the_text_should_equal({iv_text: (abap.builtin.condense({val: (await lx_previous.get().if_message$get_text())}))});
    await this.then_the_longtext_should_equal({iv_longtext: ltcl_longtext.gs_longtext_test_data.get().longtext_500});
    await this.then_the_prev_exc_should_equal({ix_exception: lx_previous});
  }
  async class_setup() {
    return ltcl_longtext.class_setup();
  }
  static async class_setup() {
    ltcl_longtext.gs_longtext_test_data.get().longtext_500.set(abap.operators.concat(new abap.types.String().set(`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et`),abap.operators.concat(new abap.types.String().set(` dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Ste`),abap.operators.concat(new abap.types.String().set(`t clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, `),abap.operators.concat(new abap.types.String().set(`consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,`),new abap.types.String().set(` sed diam voluptua. At vero eos et accusam et justo duo dolores et e`))))));
    ltcl_longtext.gs_longtext_test_data.get().longtext_500_multline.set(abap.operators.concat(new abap.types.String().set(`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et`),abap.operators.concat(new abap.types.String().set(` dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.`),abap.operators.concat(abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline,abap.operators.concat(new abap.types.String().set(`Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.`),abap.operators.concat(abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline,abap.operators.concat(abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline,abap.operators.concat(new abap.types.String().set(`Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et`),new abap.types.String().set(` dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores ete`)))))))));
    ltcl_longtext.gs_longtext_test_data.get().t100_with_longtext.get().msgid.set(abap.CharacterFactory.get(2, '00'));
    ltcl_longtext.gs_longtext_test_data.get().t100_with_longtext.get().msgno.set(abap.CharacterFactory.get(3, '002'));
  }
}
abap.Classes['CLAS-ZCX_ABAPGIT_EXCEPTION-LTCL_LONGTEXT'] = ltcl_longtext;
ltcl_longtext.gs_longtext_test_data = new abap.types.Structure({
"longtext_500": new abap.types.String({qualifiedName: "STRING"}),
"longtext_500_multline": new abap.types.String({qualifiedName: "STRING"}),
"empty_longtext": new abap.types.String({qualifiedName: "STRING"}),
"t100_with_longtext": new abap.types.Structure({
"msgty": new abap.types.Character(1, {}),
"msgid": new abap.types.Character(20, {}),
"msgno": new abap.types.Numc({length: 3}),
"msgv1": new abap.types.Character(50, {}),
"msgv2": new abap.types.Character(50, {}),
"msgv3": new abap.types.Character(50, {}),
"msgv4": new abap.types.Character(50, {})}, "SYMSG", "SYMSG", {}, {})}, undefined, undefined, {}, {});
ltcl_longtext.gs_longtext_test_data.get().empty_longtext.set(``);
export {ltcl_base, ltcl_general, ltcl_t100, ltcl_get_t100_longtext, ltcl_split_text, ltcl_longtext};