forked from CS2103-AY1819S1-W17-4/main
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently, Assert implements our custom assertThrows using try/catch. This implementation was done when we used JUnit 4, and had no proper support for assertThrows. As we migrate to JUnit 5[1], we can make use of JUnit 5's Assertions.assertThrows. However, our current assertThrows supports checking the correctness of error's message, whcih JUnit 5 does not support. Let's migrate Assert.java to use JUnit 5's assertThrows. In addition, let's create a custom assertThrowsWithMessage to support checking the correctness of error messages. The old assertThrows is kept for backward compatability, as many existing classes depend on it. It has been marked as deprecated, and will be removed in a future commit after migrating all tests. [1] se-edu#951
- Loading branch information
Showing
1 changed file
with
55 additions
and
6 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