From 1e239bf668022738723e654240f243235bfe236f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Bodn=C3=A1r?=
Date: Sat, 10 Jun 2023 09:33:11 +0200
Subject: [PATCH] Document replacement for @Test.expected in JUnit 4 migration
tips
---
.../src/docs/asciidoc/user-guide/migration-from-junit4.adoc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/documentation/src/docs/asciidoc/user-guide/migration-from-junit4.adoc b/documentation/src/docs/asciidoc/user-guide/migration-from-junit4.adoc
index 09d351fbfec6..1bea652ce7b1 100644
--- a/documentation/src/docs/asciidoc/user-guide/migration-from-junit4.adoc
+++ b/documentation/src/docs/asciidoc/user-guide/migration-from-junit4.adoc
@@ -63,6 +63,10 @@ tests to JUnit Jupiter.
* `@Rule` and `@ClassRule` no longer exist; superseded by `@ExtendWith` and
`@RegisterExtension`.
- See also <>.
+* `@Test(expected = ...)` and the `ExpectedException` rule no longer exist; use
+ `Assertions.assertThrows(...)` instead.
+ See <> if you still do need to use
+ `ExpectedException`.
* Assertions and assumptions in JUnit Jupiter accept the failure message as their last
argument instead of the first one.
- See <> for details.