Imagine you continued writing tests and that you wrote them for a couple more entities. Running them one by one can be frustrating. To make our lives easier, we will create a container test which will include all of them. Create a new class called SuiteTest and implement it like this:
package com.journaler import org.junit.runner.RunWith import org.junit.runners.Suite @RunWith(Suite::class) @Suite.SuiteClasses(NoteTest::class, TodoTest::class) class SuiteTest
This implementation is easy to understand, but we will highlight the most important parts. The @Suite.SuiteClasses(NoteTest::class, TodoTest::class) annotation will define the tests that we will execute. Here comes a list of all of our test classes we want to perform. @RunWith(Suite::class) indicates that this test will be executed as a test suite. Now, run the test suite. Observe; we executed...