Skip to content

Commit ff6d11e

Browse files
authored
Fix formatting, add missing interface method
1 parent f5264df commit ff6d11e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Get the test class associated with the specified framework method.
3030
Get the test class object associated with the specified parent runner.
3131
* `LifecycleHooks.getAtomicTestOf(Object runner)`
3232
Get the atomic test object for the specified class runner.
33-
* `LifecycleHooks.getCallableOf(Object runner, Object child)`
33+
* `LifecycleHooks.getCallableOf(Object runner, Object child)`.
3434
Get the _callable_ object associated with the specified parent runner and child runner or framework method.
3535

3636
###### Exploring the Test Run Hierarchy
@@ -111,7 +111,7 @@ Get a `Description` for the indicated child object from the runner for the speci
111111
Get class of specified test class instance.
112112
* `LifecycleHooks.getFieldValue(Object target, String name)`
113113
Get the value of the specified field from the supplied object.
114-
* `LifecycleHooks.encloseCallable(Method method, Object target, Object... params)`
114+
* `LifecycleHooks.encloseCallable(Method method, Object target, Object... params)`
115115
Synthesize a _callable_ object with the specified parameters.
116116

117117
### How to Enable Notifications
@@ -613,6 +613,7 @@ public class MyParameterizedCapture extends ArtifactCollector<MyParameterizedTyp
613613

614614
The following example implements a parameterized test class that publishes its invocation parameters through the **ArtifactParams** interface. It uses the custom **Parameterized** runner to invoke the `parameterized()` test method twice - once with input "first test", and once with input "second test". The test class constructor accepts the invocation parameter as its argument and stores it in an instance field for use by the test.
615615

616+
* The `getAtomIdentity()` method provides access to the **ParameterizedCapture** test watcher, which implements the **AtomIdentity** interface.
616617
* The `getDescription()` method acquires the **Description** object for the current `atomic test` from the `watcher` test rule.
617618
* The `getParameters()` method uses static methods of the **ArtifactParams** interface to assemble the map of invocation parameters from the `input` instance field populated by the constructor.
618619

@@ -654,6 +655,11 @@ public class ParameterizedTest implements ArtifactParams {
654655
return new Object[] { "first test", "second test" };
655656
}
656657

658+
@Override
659+
public AtomIdentity getAtomIdentity() {
660+
return watcher;
661+
}
662+
657663
@Override
658664
public Description getDescription() {
659665
return watcher.getDescription();

0 commit comments

Comments
 (0)