-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Removed unnecessary assertion that duplicates the JUnit asser…
…tion in full" This reverts commit 7f89558.
- Loading branch information
1 parent
31970eb
commit 668992e
Showing
3 changed files
with
24 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package lsh.ext.gson.test; | ||
|
||
import lombok.experimental.UtilityClass; | ||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.function.Executable; | ||
|
||
@UtilityClass | ||
public final class MoreAssertions { | ||
|
||
public static <EX extends Throwable> void assertThrows(final Class<EX> expectedClass, final String expectedMessage, final Executable executable) { | ||
final EX ex = Assertions.assertThrows(expectedClass, executable); | ||
Assertions.assertEquals(expectedMessage, ex.getMessage()); | ||
} | ||
|
||
} |