i got an issue,
i try to do a multi argument parameterized test with junit for instrumented test:
@RunWith(Parameterized::class)
class PileAddEditTopbarColorTest(
private val testedPile: WoodPile
private val testedColor: Color
) {
@get:Rule
val composeTestRule = createComposeRule()
companion object {
@JvmStatic
@Parameterized.Parameters
fun testCase() = listOf(
arrayOf(invalid_pile, redColor),
arrayOf(valid_pile, GciGreen)
)
}
}
when i try to run my test i got the following error:
java.lang.IllegalArgumentException: Wrong number of arguments; expected 3, got 2
i try multiple thing, lot of time googling but i can'T figure what i did wrong,
when i do the test using only 1 argument:
@RunWith(Parameterized::class)
class PileAddEditTopbarColorTest(
private val testedPile: WoodPile
) {
@get:Rule
val composeTestRule = createComposeRule()
companion object {
@JvmStatic
@Parameterized.Parameters
fun testCase() = listOf(
invalid_pile,
valid_pile
)
}
it's working
thank you for your help!