Added support for theories. If a class contains an array with the same name as a test method plus "_data", then the test will be executed for every row in the array. Every value in a row is passed as a parameter to the test method. The following sample tests whether doubling a value yields the correct result for multiple test cases. The first column in the array is the value to be doubled, the second column is the expected result. The test is executed three times with different values. A new test case instance is created for every iteration.
If one or more data points fails, the test is considered to have failed. The failure log lists the number and all values for every failed row.
Important: The previous test in the PRG file must end with ENDPROC or ENDFUNC. Otherwise, VFP considers the DIMENSION statement to be part of the previous test code.
Added support for theories. If a class contains an array with the same name as a test method plus "_data", then the test will be executed for every row in the array. Every value in a row is passed as a parameter to the test method. The following sample tests whether doubling a value yields the correct result for multiple test cases. The first column in the array is the value to be doubled, the second column is the expected result. The test is executed three times with different values. A new test case instance is created for every iteration.
If one or more data points fails, the test is considered to have failed. The failure log lists the number and all values for every failed row.
Important: The previous test in the PRG file must end with ENDPROC or ENDFUNC. Otherwise, VFP considers the DIMENSION statement to be part of the previous test code.