Skip to content

Use FAIL to check for expected exceptions

METHOD throws_on_empty_input.
  TRY.
      " when
      cut->do_something( '' ).
      cl_abap_unit_assert=>fail( ).
    CATCH /clean/some_exception.
      " then
  ENDTRY.
ENDMETHOD.
From SAP/styleguides under CC BY 3.0 — more details
Last updated on