Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Jun 30, 2017
1 parent bf1e000 commit 47f824e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
import org.junit.platform.engine.UniqueId;

/**
* {@link org.junit.platform.engine.TestDescriptor TestDescriptor} for {@link org.junit.jupiter.api.TestFactory @TestFactory}
* methods.
* {@link org.junit.platform.engine.TestDescriptor TestDescriptor} for
* {@link org.junit.jupiter.api.TestFactory @TestFactory} methods.
*
* @since 5.0
*/
Expand Down Expand Up @@ -70,7 +70,8 @@ protected void invokeTestMethod(JupiterEngineExecutionContext context, DynamicTe
"Illegal state: test instance not present for method: " + getTestMethod().toGenericString()));
Object testFactoryMethodResult = executableInvoker.invoke(getTestMethod(), instance, testExtensionContext,
context.getExtensionRegistry());
TestSource source = getSource().orElseThrow(() -> new JUnitException("Test source must be present"));
TestSource source = getSource().orElseThrow(
() -> new JUnitException("Illegal state: TestSource must be present"));
try (Stream<DynamicNode> dynamicNodeStream = toDynamicNodeStream(testFactoryMethodResult)) {
int index = 1;
Iterator<DynamicNode> iterator = dynamicNodeStream.iterator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,51 +248,51 @@ static void afterAll() {
private static class FooClassLevelCallbacks implements BeforeAllCallback, AfterAllCallback {

@Override
public void beforeAll(ContainerExtensionContext testExecutionContext) {
public void beforeAll(ContainerExtensionContext context) {
callSequence.add("fooBeforeAllCallback");
}

@Override
public void afterAll(ContainerExtensionContext testExecutionContext) {
public void afterAll(ContainerExtensionContext context) {
callSequence.add("fooAfterAllCallback");
}
}

private static class BarClassLevelCallbacks implements BeforeAllCallback, AfterAllCallback {

@Override
public void beforeAll(ContainerExtensionContext testExecutionContext) {
public void beforeAll(ContainerExtensionContext context) {
callSequence.add("barBeforeAllCallback");
}

@Override
public void afterAll(ContainerExtensionContext testExecutionContext) {
public void afterAll(ContainerExtensionContext context) {
callSequence.add("barAfterAllCallback");
}
}

private static class BazClassLevelCallbacks implements BeforeAllCallback, AfterAllCallback {

@Override
public void beforeAll(ContainerExtensionContext testExecutionContext) {
public void beforeAll(ContainerExtensionContext context) {
callSequence.add("bazBeforeAllCallback");
}

@Override
public void afterAll(ContainerExtensionContext testExecutionContext) {
public void afterAll(ContainerExtensionContext context) {
callSequence.add("bazAfterAllCallback");
}
}

private static class QuuxClassLevelCallbacks implements BeforeAllCallback, AfterAllCallback {

@Override
public void beforeAll(ContainerExtensionContext testExecutionContext) {
public void beforeAll(ContainerExtensionContext context) {
callSequence.add("quuxBeforeAllCallback");
}

@Override
public void afterAll(ContainerExtensionContext testExecutionContext) {
public void afterAll(ContainerExtensionContext context) {
callSequence.add("quuxAfterAllCallback");
}
}
Expand Down

0 comments on commit 47f824e

Please sign in to comment.