I am starting with Fitnesse, and try to Test the following:
!define TEST_SYSTEM {slim}
!path C:\Users\binF\java
|import|
|org.magmax|
|multiplication|
|factor|factor|multiply?|
|4|2|8|
|44|12|8|
I have the file multiplication.class
in the specified path, the code:
package org.magmax;
import java.util.ArrayList;
import java.util.List;
public class multiplication {
private ArrayList<Integer> factors = new ArrayList<Integer>();
public void setFactor(int n) {
factors.add(n);
}
public long multiply() {
long result = 1;
for (Integer i: factors) {
result *= i;
}
return result;
}
}
Then, I execute the Test and returns the error of the type:
Multiplication factor multiply? 4 The instance decisionTable_1.setFactor. does not exist
Can you help me? I do not know to fix this error Many thanks in advance for your comments.