Question: White Box Testing Given the following method in Java, which finds the maximum value in an array of integers. public static int maximumValue(int[] a) {
White Box Testing
Given the following method in Java, which finds the maximum value in an array of integers.
public static int maximumValue(int[] a) {
if (a != null && a.length > 0) {
int max = a[0];
for (int i = 1; i < a.length; i++) {
if (a[i] > max) {
max = a[i];
}
}
return max;
}
return Integer.MIN_VALUE;
}
Design a test suite with the fewest number of test cases that satisfies the statement test criterion.
Design a test suite with the fewest number of test cases that satisfies the branch-condition test criterion.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
