Description: Exception Catching Throwing (ECT) occurs when a test method explicitly a passing or failing of a test method is dependent on the production method throwing an exception. Developers should utilize JUnit's exception handling to automatically pass/fail the test instead of writing custom exception handling code or throwing an exception.
Detection: A test method that contains either a throw statement or a catch clause.
Problem: Only one ECT is detected in the test method, even if the test method has multiple try-catch blocks. Fix the test smell detection to count each of its instances and to point the location of the try-catch block.
Description: Exception Catching Throwing (ECT) occurs when a test method explicitly a passing or failing of a test method is dependent on the production method throwing an exception. Developers should utilize JUnit's exception handling to automatically pass/fail the test instead of writing custom exception handling code or throwing an exception.
Detection: A test method that contains either a throw statement or a catch clause.
Problem: Only one ECT is detected in the test method, even if the test method has multiple try-catch blocks. Fix the test smell detection to count each of its instances and to point the location of the try-catch block.