Skip to content

Commit a371498

Browse files
committed
Add an PlexusExtension#setContext protected method
1 parent e8e1d0b commit a371498

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/org/codehaus/plexus/testing/PlexusExtension.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ public class PlexusExtension implements BeforeEachCallback, AfterEachCallback {
7474
@Override
7575
public void beforeEach(ExtensionContext context) throws Exception {
7676
basedir = getBasedir();
77-
this.context = context;
77+
78+
setContext(context);
7879

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

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

87+
protected void setContext(ExtensionContext context) {
88+
this.context = context;
89+
}
90+
8691
@SuppressWarnings("ResultOfMethodCallIgnored")
8792
protected void setupContainer() {
8893
// ----------------------------------------------------------------------------

0 commit comments

Comments
 (0)