In Order to Effectively Cover and Validate the Behavior of Your Exception Handlers, You Must Design Unit Test Cases That Will Cause Your Code to Fail and Enter Error-Handling Pathways. Passing Known Bad Parameters to Methods, or Inserting Bad Data in the Unit Test Context, to Cause a Failure.
What Makes an Exception Fail in a Unit Test?
•
•
3 min read
★ Key Takeaways
In Order to Effectively Cover and Validate the Behavior of Your Exception Handlers, You Must Design Unit Test Cases That Will Cause Your Code to Fail and Enter Error-Handling Pathways. Passing Known Bad Parameters to Methods, or Inserting Bad Data in the Unit Test Context, to Cause a Failure.
Direct Answer • Key Takeaway