@@ -74,7 +74,7 @@ void fromJupiterEngineDescriptor() {
74
74
UniqueId .root ("engine" , "junit-jupiter" ), configuration );
75
75
76
76
JupiterEngineExtensionContext engineContext = new JupiterEngineExtensionContext (null , engineTestDescriptor ,
77
- configuration , null );
77
+ configuration , __ -> null );
78
78
79
79
// @formatter:off
80
80
assertAll ("engineContext" ,
@@ -100,7 +100,7 @@ void fromClassTestDescriptor() {
100
100
ClassTestDescriptor outerClassDescriptor = outerClassDescriptor (nestedClassDescriptor );
101
101
102
102
ClassExtensionContext outerExtensionContext = new ClassExtensionContext (null , null , outerClassDescriptor ,
103
- configuration , null , null );
103
+ configuration , null , __ -> null );
104
104
105
105
// @formatter:off
106
106
assertAll ("outerContext" ,
@@ -118,7 +118,7 @@ void fromClassTestDescriptor() {
118
118
// @formatter:on
119
119
120
120
ClassExtensionContext nestedExtensionContext = new ClassExtensionContext (outerExtensionContext , null ,
121
- nestedClassDescriptor , configuration , null , null );
121
+ nestedClassDescriptor , configuration , null , __ -> null );
122
122
assertThat (nestedExtensionContext .getParent ()).containsSame (outerExtensionContext );
123
123
}
124
124
@@ -131,18 +131,18 @@ void tagsCanBeRetrievedInExtensionContext() {
131
131
outerClassDescriptor .addChild (methodTestDescriptor );
132
132
133
133
ClassExtensionContext outerExtensionContext = new ClassExtensionContext (null , null , outerClassDescriptor ,
134
- configuration , null , null );
134
+ configuration , null , __ -> null );
135
135
136
136
assertThat (outerExtensionContext .getTags ()).containsExactly ("outer-tag" );
137
137
assertThat (outerExtensionContext .getRoot ()).isSameAs (outerExtensionContext );
138
138
139
139
ClassExtensionContext nestedExtensionContext = new ClassExtensionContext (outerExtensionContext , null ,
140
- nestedClassDescriptor , configuration , null , null );
140
+ nestedClassDescriptor , configuration , null , __ -> null );
141
141
assertThat (nestedExtensionContext .getTags ()).containsExactlyInAnyOrder ("outer-tag" , "nested-tag" );
142
142
assertThat (nestedExtensionContext .getRoot ()).isSameAs (outerExtensionContext );
143
143
144
144
MethodExtensionContext methodExtensionContext = new MethodExtensionContext (outerExtensionContext , null ,
145
- methodTestDescriptor , configuration , new OpenTest4JAwareThrowableCollector (), null );
145
+ methodTestDescriptor , configuration , new OpenTest4JAwareThrowableCollector (), __ -> null );
146
146
methodExtensionContext .setTestInstances (DefaultTestInstances .of (new OuterClass ()));
147
147
assertThat (methodExtensionContext .getTags ()).containsExactlyInAnyOrder ("outer-tag" , "method-tag" );
148
148
assertThat (methodExtensionContext .getRoot ()).isSameAs (outerExtensionContext );
@@ -161,11 +161,11 @@ void fromMethodTestDescriptor() {
161
161
Method testMethod = methodTestDescriptor .getTestMethod ();
162
162
163
163
JupiterEngineExtensionContext engineExtensionContext = new JupiterEngineExtensionContext (null , engineDescriptor ,
164
- configuration , null );
164
+ configuration , __ -> null );
165
165
ClassExtensionContext classExtensionContext = new ClassExtensionContext (engineExtensionContext , null ,
166
- classTestDescriptor , configuration , null , null );
166
+ classTestDescriptor , configuration , null , __ -> null );
167
167
MethodExtensionContext methodExtensionContext = new MethodExtensionContext (classExtensionContext , null ,
168
- methodTestDescriptor , configuration , new OpenTest4JAwareThrowableCollector (), null );
168
+ methodTestDescriptor , configuration , new OpenTest4JAwareThrowableCollector (), __ -> null );
169
169
methodExtensionContext .setTestInstances (DefaultTestInstances .of (testInstance ));
170
170
171
171
// @formatter:off
@@ -191,7 +191,7 @@ void reportEntriesArePublishedToExecutionContext() {
191
191
ClassTestDescriptor classTestDescriptor = outerClassDescriptor (null );
192
192
EngineExecutionListener engineExecutionListener = Mockito .spy (EngineExecutionListener .class );
193
193
ExtensionContext extensionContext = new ClassExtensionContext (null , engineExecutionListener ,
194
- classTestDescriptor , configuration , null , null );
194
+ classTestDescriptor , configuration , null , __ -> null );
195
195
196
196
Map <String , String > map1 = Collections .singletonMap ("key" , "value" );
197
197
Map <String , String > map2 = Collections .singletonMap ("other key" , "other value" );
@@ -222,9 +222,9 @@ void usingStore() {
222
222
TestMethodTestDescriptor methodTestDescriptor = methodDescriptor ();
223
223
ClassTestDescriptor classTestDescriptor = outerClassDescriptor (methodTestDescriptor );
224
224
ExtensionContext parentContext = new ClassExtensionContext (null , null , classTestDescriptor , configuration , null ,
225
- null );
225
+ __ -> null );
226
226
MethodExtensionContext childContext = new MethodExtensionContext (parentContext , null , methodTestDescriptor ,
227
- configuration , new OpenTest4JAwareThrowableCollector (), null );
227
+ configuration , new OpenTest4JAwareThrowableCollector (), __ -> null );
228
228
childContext .setTestInstances (DefaultTestInstances .of (new OuterClass ()));
229
229
230
230
ExtensionContext .Store childStore = childContext .getStore (Namespace .GLOBAL );
@@ -274,9 +274,9 @@ Stream<DynamicTest> configurationParameter() throws Exception {
274
274
configuration );
275
275
276
276
return Stream .of ( //
277
- (ExtensionContext ) new JupiterEngineExtensionContext (null , engineDescriptor , echo , null ), //
278
- new ClassExtensionContext (null , null , classTestDescriptor , echo , null , null ), //
279
- new MethodExtensionContext (null , null , methodTestDescriptor , echo , null , null ) //
277
+ (ExtensionContext ) new JupiterEngineExtensionContext (null , engineDescriptor , echo , __ -> null ), //
278
+ new ClassExtensionContext (null , null , classTestDescriptor , echo , null , __ -> null ), //
279
+ new MethodExtensionContext (null , null , methodTestDescriptor , echo , null , __ -> null ) //
280
280
).map (context -> dynamicTest (context .getClass ().getSimpleName (),
281
281
() -> assertEquals (expected , context .getConfigurationParameter (key ))));
282
282
}
0 commit comments