Quite often I find in test codeunit UI Handlers (Message and Confirm) that do not contain any code. IMHO it should always check the Msg/Qst parameter to validate that the right message/confirm was triggered. If not, it would just handle any message popping up in the execution of the test code.
Justification
When the triggered production code has been changed due to a newly added Message of Confirm, or a change in the flow, existing tests should fail telling me that indeed the business logic has changed. As such it will urge me to update my test code.
Quite often I find in test codeunit UI Handlers (Message and Confirm) that do not contain any code. IMHO it should always check the Msg/Qst parameter to validate that the right message/confirm was triggered. If not, it would just handle any message popping up in the execution of the test code.
Justification
When the triggered production code has been changed due to a newly added
Message
ofConfirm
, or a change in the flow, existing tests should fail telling me that indeed the business logic has changed. As such it will urge me to update my test code.Curious what you think about this.