Skip to content

Commit

Permalink
#40: Rename for consistency and readability
Browse files Browse the repository at this point in the history
------------------------------------------------------------------------
On behalf of the community, the JUnit Lambda Team thanks
msg systems ag (http://www.msg-systems.com) for supporting
the JUnit crowdfunding campaign!
------------------------------------------------------------------------
  • Loading branch information
marcphilipp committed Jan 6, 2016
1 parent 319b8d1 commit f8514fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Expand Up @@ -43,14 +43,14 @@ public void testRunStarted(Description description) {


@Override @Override
public void testIgnored(Description description) { public void testIgnored(Description description) {
TestDescriptor testDescriptor = testRun.lookupDescriptor(description); TestDescriptor testDescriptor = testRun.lookupTestDescriptor(description);
String reason = determineReasonForIgnoredTest(description); String reason = determineReasonForIgnoredTest(description);
testIgnored(testDescriptor, reason); testIgnored(testDescriptor, reason);
} }


@Override @Override
public void testStarted(Description description) { public void testStarted(Description description) {
testStarted(testRun.lookupDescriptor(description)); testStarted(testRun.lookupTestDescriptor(description));
} }


@Override @Override
Expand All @@ -65,7 +65,7 @@ public void testFailure(Failure failure) {


@Override @Override
public void testFinished(Description description) { public void testFinished(Description description) {
testFinished(testRun.lookupDescriptor(description)); testFinished(testRun.lookupTestDescriptor(description));
} }


@Override @Override
Expand All @@ -76,7 +76,7 @@ public void testRunFinished(Result result) {
} }


private void handleFailure(Failure failure, Function<Throwable, TestExecutionResult> resultCreator) { private void handleFailure(Failure failure, Function<Throwable, TestExecutionResult> resultCreator) {
TestDescriptor testDescriptor = testRun.lookupDescriptor(failure.getDescription()); TestDescriptor testDescriptor = testRun.lookupTestDescriptor(failure.getDescription());
TestExecutionResult result = resultCreator.apply(failure.getException()); TestExecutionResult result = resultCreator.apply(failure.getException());
testRun.storeResult(testDescriptor, result); testRun.storeResult(testDescriptor, result);
if (testDescriptor.isContainer() && testRun.isDescendantOfRunnerTestDescriptor(testDescriptor)) { if (testDescriptor.isContainer() && testRun.isDescendantOfRunnerTestDescriptor(testDescriptor)) {
Expand Down Expand Up @@ -134,7 +134,8 @@ private boolean canStart(TestDescriptor testDescriptor) {
} }


private boolean canFinish(TestDescriptor testDescriptor) { private boolean canFinish(TestDescriptor testDescriptor) {
return testRun.isNotFinished(testDescriptor) && testRun.isDescendantOfRunnerTestDescriptor(testDescriptor) return testRun.isNotFinished(testDescriptor) //
&& testRun.isDescendantOfRunnerTestDescriptor(testDescriptor)
&& testRun.areAllFinishedOrSkipped(testDescriptor.getChildren()); && testRun.areAllFinishedOrSkipped(testDescriptor.getChildren());
} }


Expand Down
Expand Up @@ -55,7 +55,7 @@ boolean isDescendantOfRunnerTestDescriptor(TestDescriptor testDescriptor) {
return runnerDescendants.contains(testDescriptor); return runnerDescendants.contains(testDescriptor);
} }


TestDescriptor lookupDescriptor(Description description) { TestDescriptor lookupTestDescriptor(Description description) {
return descriptionToDescriptor.get(description); return descriptionToDescriptor.get(description);
} }


Expand Down

0 comments on commit f8514fd

Please sign in to comment.