Skip to content

Commit

Permalink
Add an PlexusExtension#setContext protected method
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Dec 13, 2023
1 parent e8e1d0b commit a371498
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ public class PlexusExtension implements BeforeEachCallback, AfterEachCallback {
@Override
public void beforeEach(ExtensionContext context) throws Exception {
basedir = getBasedir();
this.context = context;

setContext(context);

getContainer().addComponent(getContainer(), PlexusContainer.class.getName());

Expand All @@ -83,6 +84,10 @@ public void beforeEach(ExtensionContext context) throws Exception {
Collections.emptyList(), binder -> binder.requestInjection(context.getRequiredTestInstance()));
}

protected void setContext(ExtensionContext context) {
this.context = context;
}

@SuppressWarnings("ResultOfMethodCallIgnored")
protected void setupContainer() {
// ----------------------------------------------------------------------------
Expand Down

0 comments on commit a371498

Please sign in to comment.