I've implemented a function which calculate annual mortgage repayment, and I want to test whether it generates the correct results.
I've put input mortgage values in an array, such as:
input_array([ 50000., 100000., 150000., ...])
and the corresponding results in another array:
output_array([ 3200.60, 6401.20, 9601.79, ...])
I'd like to take each of the elements in the input array as the input of my function and test the result is the same as output_array.
Is it possible to do it automatically rather than input the mortgage value and expected output in the assertEqual function manually?
Many thanks.