sft.result.ResultDigest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of SimpleFunctionalTest Show documentation
Show all versions of SimpleFunctionalTest Show documentation
A JUnit extension to easily adopt functional testing and acceptance testing
The newest version!
package sft.result;
import java.util.ArrayList;
public class ResultDigest {
public final ArrayList scenariosSucceeded = new ArrayList();
public final ArrayList scenariosFailed = new ArrayList();
public final ArrayList scenariosIgnored = new ArrayList();
public int nbScenariosOk;
public ResultDigest(UseCaseResult useCaseResult) {
extractFrom(useCaseResult);
}
private void extractFrom(UseCaseResult useCaseResult) {
for (ScenarioResult scenarioResult : useCaseResult.scenarioResults) {
switch (scenarioResult.issue) {
case FAILED:
scenariosFailed.add(scenarioResult);
break;
case IGNORED:
scenariosIgnored.add(scenarioResult);
break;
default:
case SUCCEEDED:
scenariosSucceeded.add(scenarioResult);
nbScenariosOk++;
}
}
for (SubUseCaseResult subUseCaseResult : useCaseResult.subUseCaseResults) {
extractFrom(subUseCaseResult.useCaseResult);
}
}
}