...

/

Test Smell: Unnecessary Test Code

Test Smell: Unnecessary Test Code

Learn about exceptions in Search methods and how to prevent them.

Expect the exceptions

The test code that comprises testSearch() doesn’t expect any exceptions to be thrown. It contains a number of assertions against positive facts. If the test code throws an exception, a try/catch block ...

Access this course and 1400+ top-rated courses and projects.