I tried run Parameterized Unit Test as below in Android Studio.
import android.test.suitebuilder.annotation.SmallTest;
import junit.framework.TestCase;
i
I made the mistake of defining my test like this
class MyTest {
@Test
fun `test name`() = runBlocking {
// something here that isn't Unit
}
}
That resulted in runBlocking returning something, which meant that the method wasn't void and junit didn't recognize it as a test. That was pretty lame. I explicitly supply a type parameter now to run blocking. It won't stop the pain or get me my two hours back but it will make sure this doesn't happen again.
class MyTest {
@Test
fun `test name`() = runBlocking { // Specify Unit
// something here that isn't Unit
}
}