Skip to content

Commit

Permalink
Update user-guide
Browse files Browse the repository at this point in the history
Issue: #3717
Signed-off-by: yongjunhong <[email protected]>
  • Loading branch information
YongGoose committed Nov 27, 2024
1 parent 6c5d6c3 commit 13645f0
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion documentation/src/docs/asciidoc/user-guide/extensions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,20 @@ Specifically, a custom extension can be registered by supplying its fully qualif
name in a file named `org.junit.jupiter.api.extension.Extension` within the
`/META-INF/services` folder in its enclosing JAR file.

[[automatic-extension-registration-pattern-matching]]
===== Pattern Matching Syntax

Pattern matching syntax is used to automatically detect and register extensions. Here are some examples of pattern matching syntax:

- `*`: includes all extensions.
- `org.junit.*`: includes every extension under the `org.junit` base package and any of its subpackages.
- `*.MyExtension`: includes every extension whose simple class name is exactly `MyExtension`.
- `*System*`: includes every extension whose FQCN contains `System`.
- `*System*, *Dev*`: includes every extension whose FQCN contains `System` or `Dev`.
- `org.example.MyExtension, org.example.TheirExtension`: includes extensions whose FQCN is exactly `org.example.MyExtension` or `org.example.TheirExtension`.

> **Note**: A class that matches both an inclusion and exclusion pattern will be excluded.

[[extensions-registration-automatic-enabling]]
===== Enabling Automatic Extension Detection

Expand Down Expand Up @@ -368,7 +382,7 @@ following system property.
[[extensions-conditions-deactivation-patterns]]
===== Pattern Matching Syntax

Refer to <<running-tests-config-params-deactivation-pattern>> for details.
Pattern matching syntax is used to automatically detect and register extensions. For more details, refer to the <<automatic-extension-registration-pattern-matching,Pattern Matching Syntax>> section.

[[extensions-test-instance-pre-construct-callback]]
=== Test Instance Pre-construct Callback
Expand Down

0 comments on commit 13645f0

Please sign in to comment.