Why
In order to better document the API and demonstrate usage, there should be a reference implementation of an extension.
Description
Ideally the reference extension should demonstrate:
- Extension callbacks (
IBefore*Callback and/or IAfter*Callback)
- Parameter resolution (
IParameterResolver)
- Contextual data store use with suite-level fallback
- Practical application; the extension should actually be useful
The SceneRunnerExtension meets all of these criteria:
- Must implement
IBeforeEachCallback and IAfterEachCallback to create and dispose of scene runner
- Must implement
IParameterResolver to inject the scene runner and scene node.
- Will use
IParameterStore to store the scene runner before each test runs, retrieve it when injecting parameters, and dispose of it after each test.
- Reduces common test boilerplate and as such had real-world applications
Acceptance criteria
Why
In order to better document the API and demonstrate usage, there should be a reference implementation of an extension.
Description
Ideally the reference extension should demonstrate:
IBefore*Callbackand/orIAfter*Callback)IParameterResolver)The
SceneRunnerExtensionmeets all of these criteria:IBeforeEachCallbackandIAfterEachCallbackto create and dispose of scene runnerIParameterResolverto inject the scene runner and scene node.IParameterStoreto store the scene runner before each test runs, retrieve it when injecting parameters, and dispose of it after each test.Acceptance criteria
SceneRunnerExtensionimplemented[RegisterExtension] on fields[ExtendWith<T>] on classesISceneRunnerand scene[TestCase]and injected parameters