Look at the test class:
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class CalculatorTest {
@ParameterizedTest
@MethodSource("argFactory")
fun testMinOf(first: Int, second: Int, expected: Int) {
val result = Calculator().minOf(first, second)
assertEquals(expected, result)
}
fun argFactory(): List<Arguments?>? {
return listOf(arguments(2, 1, 1), arguments(31, 10, 10), arguments(5, 0, 0))
}
}
It's written for the class:
class Calculator {
fun minOf(a: Int, b: Int): Int {
return if (a <= b) a else b
}
}
What will be the result of the test class?