Question: Your task is to write a set of JUnit test cases that comprehensively test the given code. A comprehensive set of test cases is one
Your task is to write a set of JUnit test cases that comprehensively test the
given code. A comprehensive set of test cases is one that not only checks if
the expected output is the same as the actual output, as described in the
specification above but also traverses all paths in the code. If there is a
conditional statement, both the true and false conditions should be tested.
For multiple conditions, all possible combinations of the conditions being true
or false should be tested. This means if the condition is "A AND B four
different test cases should be written, unless it is not possible. The four
conditions are: ATrue, BTrue ATrue, BFalse AFalse, BTrue
AFalse, BFalse.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
