Skip to content

Commit

Permalink
Rename getNumberOfStaticTests to countStaticTests
Browse files Browse the repository at this point in the history
  • Loading branch information
jlink committed Nov 14, 2015
1 parent c1680cf commit 14390ec
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Expand Up @@ -36,7 +36,7 @@ public ColoredPrintingTestListener(PrintStream out) {

@Override
public void testPlanExecutionStarted(TestPlan testPlan) {
out.printf("Test execution started. Number of static tests: %d%n", testPlan.getNumberOfStaticTests());
out.printf("Test execution started. Number of static tests: %d%n", testPlan.countStaticTests());
}

@Override
Expand Down Expand Up @@ -115,7 +115,7 @@ void println(Color color, String format, Object... args) {
out.println(color + String.format(format, args) + NONE);
}

static enum Color {
enum Color {

NONE(0),

Expand Down
Expand Up @@ -44,7 +44,7 @@ public TestSummaryReportingTestListener(PrintStream out) {

@Override
public void testPlanExecutionStarted(TestPlan testPlan) {
this.testsFound.set(testPlan.getNumberOfStaticTests());
this.testsFound.set(testPlan.countStaticTests());
this.timeStarted = System.currentTimeMillis();
}

Expand Down Expand Up @@ -98,7 +98,7 @@ public void testStarted(TestDescriptor testDescriptor) {

@Override
public void testSkipped(TestDescriptor testDescriptor, Throwable t) {
this.testsSkipped.addAndGet(testDescriptor.getNumberOfStaticTests());
this.testsSkipped.addAndGet(testDescriptor.countStaticTests());
}

@Override
Expand Down
Expand Up @@ -50,7 +50,7 @@ default boolean isRoot() {

Set<TestDescriptor> getChildren();

default long getNumberOfStaticTests() {
default long countStaticTests() {
AtomicLong staticTests = new AtomicLong(0);
Visitor visitor = (descriptor, remove) -> {
if (descriptor.isTest())
Expand Down
Expand Up @@ -51,9 +51,8 @@ public Optional<EngineDescriptor> getEngineDescriptorFor(TestEngine testEngine)
descriptor -> descriptor.getEngine().equals(testEngine)).findFirst();
}

public long getNumberOfStaticTests() {
return this.engineDescriptors.stream().mapToLong(
engineDescriptor -> engineDescriptor.getNumberOfStaticTests()).sum();
public long countStaticTests() {
return this.engineDescriptors.stream().mapToLong(engineDescriptor -> engineDescriptor.countStaticTests()).sum();
}

@Override
Expand Down

0 comments on commit 14390ec

Please sign in to comment.