After you have finished this exercise, you understand how you can enforce business rules with soft assertions and use the assertSoftly()
method of the SoftAssertions
class. You can finish this exercise by following these steps:
1. Open the TodoItemTest
class that’s found from the com.cleantestautomation.junit5intro
package.
2. Write the soft assertions which verify that the closed todo item was closed because it was finished. You can find the relevant test method from this nested test class: CloseAsDone
. Remember to use the assertSoftly()
method of the SoftAssertions
class.
3. Run the tests found from the TodoItemTest
class and make sure that they pass.