Question 630
A shipping add-on needs regression tests for a codeunit's charge calculation after deployment. The developer recommends the following change: Create a SubType Test codeunit with Test methods that assert expected results. Which technical explanation most directly justifies it in this case?
Explanation
Correct Answer
Business Central AL Test codeunits execute test methods to verify business behavior under controlled input. It connects the proposed action to the exact failure or requirement—A shipping add-on needs regression tests for a codeunit's charge calculation after deployment. Confirmation would be a test fixture passes for the valid input and fails for a deliberately incorrect computed amount.
Incorrect Answers
That mechanism explains why the alternative action—use suitable test transaction isolation and controlled fixture setup—helps in another case. It does not justify the proposed fix here; Business Central al test codeunits execute test methods to verify business behavior under controlled input. The distinguishing requirement is: A shipping add-on needs regression tests for a codeunit's charge calculation after deployment.
That mechanism explains why the alternative action—add the appropriate handler methods to simulate expected user interaction in tests—helps in another case. It does not justify the proposed fix here; Business Central al test codeunits execute test methods to verify business behavior under controlled input. The distinguishing requirement is: A shipping add-on needs regression tests for a codeunit's charge calculation after deployment.
That mechanism explains why the alternative action—install and configure the Business Central test toolkit and the required test applications—helps in another case. It does not justify the proposed fix here; Business Central al test codeunits execute test methods to verify business behavior under controlled input. The distinguishing requirement is: A shipping add-on needs regression tests for a codeunit's charge calculation after deployment.





Microsoft Dynamics 365 Business Central Developer (MB-820) Practice Tests