@@ -85,6 +85,7 @@ initialization methods on the test instance, etc.
85
85
For concrete examples, consult the source code for the `{MockitoExtension}` and the
86
86
`{SpringExtension}`.
87
87
88
+
88
89
=== Parameter Resolution
89
90
90
91
`{MethodParameterResolver}` is an `Extension` strategy for dynamically resolving
@@ -98,25 +99,29 @@ resolved by _name_, _type_, _annotation_, or any combination thereof. For concre
98
99
consult the source code for `{CustomTypeParameterResolver}` and
99
100
`{CustomAnnotationParameterResolver}`.
100
101
102
+
101
103
=== Test Lifecycle Callbacks
102
104
103
105
The following interfaces define the APIs for extending tests at various points in the
104
106
test execution lifecycle. Consult the Javadoc for each of these in the
105
- `{extension-api-package}` package.
107
+ `{extension-api-package}` package for further details .
106
108
107
- * `BeforeEachExtensionPoint`
108
- * `AfterEachExtensionPoint`
109
- * `BeforeAllExtensionPoint`
110
- * `AfterAllExtensionPoint`
109
+ * `BeforeAllCallback`
110
+ * `AfterAllCallback`
111
+ * `BeforeEachCallback`
112
+ * `AfterEachCallback`
113
+ * `BeforeTestMethodCallback`
114
+ * `AfterTestMethodCallback`
111
115
112
116
Note that extension developers may choose to implement any number of these interfaces
113
117
within a single extension. Consult the source code of the `{SpringExtension}` for a
114
118
concrete example.
115
119
120
+
116
121
=== Exception Handling
117
122
118
- `{ExceptionHandlerExtensionPoint }` defines the API for `Extensions` that wish to _react to
119
- exceptions_ thrown in a test .
123
+ `{ExceptionHandler }` defines the API for `Extensions` that wish to handle exceptions
124
+ thrown from tests .
120
125
121
126
The following example shows an extension which will swallow all instances of `IOException`
122
127
but rethrow any other type of exception:
@@ -129,14 +134,12 @@ include::{testDir}/example/exception/IgnoreIOExceptionExtension.java[tags=user_g
129
134
----
130
135
131
136
132
-
133
137
=== Keeping State in Extensions
134
138
135
139
Usually, an extension is instantiated only once. So the question becomes relevant: How do you keep the state
136
140
from one invocation of an extension point to the next? ...
137
141
138
142
139
-
140
143
=== Additional Planned Extensions
141
144
142
145
Several additional extensions are planned, including but not limited to the following:
0 commit comments