Tag: unit
-
How to assert an exception message in ABAP Unit test
How may have the requirement to assert in a unit test an exception, which has been thrown. To properly test, if the thrown message is equal to the expected message, we can check the message ID. So first, let’s assume that we have a method, which throws a custom exception. Our exception class contains some…