com.trivago.cluecumber.rendering.pages.pojos.pagecollections.ScenarioSummaryPageCollection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cluecumber-report-plugin
Show all versions of cluecumber-report-plugin
Plugin for generating clear Cucumber BDD test result reports.
package com.trivago.cluecumber.rendering.pages.pojos.pagecollections;
import com.trivago.cluecumber.constants.Status;
import java.util.HashSet;
import java.util.Set;
public class ScenarioSummaryPageCollection extends SummaryPageCollection {
private Set totalFailed = new HashSet<>();
private Set totalPassed = new HashSet<>();
private Set totalSkipped = new HashSet<>();
ScenarioSummaryPageCollection(final String pageTitle) {
super(pageTitle);
}
public int getTotalNumberOfScenarios() {
return getTotalNumberOfPassed() + getTotalNumberOfFailed() + getTotalNumberOfSkipped();
}
public int getTotalNumberOfPassed() {
return totalPassed.size();
}
public int getTotalNumberOfFailed() {
return totalFailed.size();
}
public int getTotalNumberOfSkipped() {
return totalSkipped.size();
}
public void addScenarioIndexByStatus(final Status status, final int scenarioIndex) {
switch (status) {
case FAILED:
totalFailed.add(scenarioIndex);
break;
case PASSED:
totalPassed.add(scenarioIndex);
break;
case SKIPPED:
totalSkipped.add(scenarioIndex);
default:
}
}
}