Goals:
Download the archive assignment 6.tar.gz. This will create a directory called Assignment6 in the root of your repository. The directory includes:
assignment 6.tar.gz
Assignment6
junit-platform-console-standalone-1.9.1.jar
After reading all instructions, complete the following tasks in the BustedClass class as described:
BustedClass
bustedMethod1
<dir>/test
bustedMethod2
bustedMethod3
The bustedMethod4 method (provided) must be tested to cover both statement and MC/DC coverage.
bustedMethod4
public static int bustedMethod4(boolean a, boolean b, int c, int d, int e) { int result = 0; if (a != b) { if ((c < 0) && (d == 0) || (e > 0)) { result = 1; } else { result = 2; } } else { result = 3; } return result; }
Evaluate the following method bustedMethod5 with its provided test table and sentences.
bustedMethod5
public static boolean bustedMethod5(boolean a, boolean b) { int x; int y; if (a) { x = 0; } else { x = 2; } if (b) { y = 2*x - x; } else { y = 1; } return ((x*2)/y > 0); }
Assignment 6 challenges students to explore the mechanics of white-box testing, encouraging a nuanced understanding of structural coverage and fault revelation within Java-based systems.