/** * Sums the property values of the items in this iterable defined by the given argument. * @param argument An argument defined using the {@link Lambda#on(Class)} method * @return The sum of the property values extracted from all the items in the given iterable */ public <A> A sum(A argument) { return Lambda.sum(getInner(), argument); }
public Long getDuration() { if ((duration == 0) && (testSteps.size() > 0)) { return sum(testSteps, on(TestStep.class).getDuration()); } else { return duration; } }
public Long getDuration() { if ((duration == 0) && (testSteps.size() > 0)) { return sum(testSteps, on(TestStep.class).getDuration()); } else { return duration; } }
/** * @return The total number of test runs in this set (including rows in data-driven tests). */ public int getTotal() { return sum(outcomes, on(TestOutcome.class).getTestCount()); }
/** * @return The total number of test runs in this set (including rows in data-driven tests). */ public int getTotal() { return sum(outcomes, on(TestOutcome.class).getTestCount()); }
protected int countTestsWithResult(TestResult expectedResult, TestType testType) { return sum(outcomes, on(TestOutcome.class).countResults(expectedResult, testType)); }
/** * @return The total number of nested steps in these test outcomes. */ public int getStepCount() { return sum(extract(outcomes, on(TestOutcome.class).getNestedStepCount())).intValue(); }
protected int countTestsWithResult(TestResult expectedResult, TestType testType) { return sum(outcomes, on(TestOutcome.class).countResults(expectedResult, testType)); }
/** * @return The total number of nested steps in these test outcomes. */ public int getStepCount() { return sum(extract(outcomes, on(TestOutcome.class).getNestedStepCount())).intValue(); }
public double getOverallStability() { if (outcomes.isEmpty()) { return 0.0; } else { return sum(outcomes, on(TestOutcome.class).getOverallStability()) / getTestCount(); } }
/** * @param testType 'manual' or 'automated' (this is a string because it is mainly called from the freemarker templates */ public int successCount(String testType) { return sum(outcomes, on(TestOutcome.class).countResults(SUCCESS, TestType.valueOf(testType.toUpperCase()))); }
public double getRecentStability() { if (outcomes.isEmpty()) { return 0.0; } else { return sum(outcomes, on(TestOutcome.class).getRecentStability()) / getTestCount(); } }
/** * @param testType 'manual' or 'automated' (this is a string because it is mainly called from the freemarker templates */ public int successCount(String testType) { return sum(outcomes, on(TestOutcome.class).countResults(SUCCESS, TestType.valueOf(testType.toUpperCase()))); }
public double getRecentStability() { if (outcomes.isEmpty()) { return 0.0; } else { return sum(outcomes, on(TestOutcome.class).getRecentStability()) / getTestCount(); } }
public double getOverallStability() { if (outcomes.isEmpty()) { return 0.0; } else { return sum(outcomes, on(TestOutcome.class).getOverallStability()) / getTestCount(); } }
private int countStepsWithResult(TestResult expectedResult, TestType testType) { int stepCount = sum(outcomes, on(TestOutcome.class).countNestedStepsWithResult(expectedResult, testType)); if ((stepCount == 0) && aMatchingTestExists(expectedResult, testType)) { return (int) Math.round(getAverageTestSize()); } return stepCount; }
private int countStepsWithResult(TestResult expectedResult, TestType testType) { int stepCount = sum(outcomes, on(TestOutcome.class).countNestedStepsWithResult(expectedResult, testType)); if ((stepCount == 0) && aMatchingTestExists(expectedResult, testType)) { return (int) Math.round(getAverageTestSize()); } return stepCount; }
public int withResult(TestResult expectedResult) { return sum(outcomes.getOutcomes(), on(TestOutcome.class).countResults(expectedResult)); }
public int getTotalDataRows() { List<? extends TestOutcome> datadrivenTestOutcomes = filter(having(on(TestOutcome.class).isDataDriven(), is(true)), outcomes); return sum(datadrivenTestOutcomes, on(TestOutcome.class).getDataTable().getSize()); }
public int getTotalDataRows() { List<? extends TestOutcome> datadrivenTestOutcomes = filter(having(on(TestOutcome.class).isDataDriven(), is(true)), outcomes); return sum(datadrivenTestOutcomes, on(TestOutcome.class).getDataTable().getSize()); }