Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
object Calculator {
fun divide(a: Int, b: Int): Int {
return a / b
class ParameterizedTest(
private val num1: Int,
private val num2: Int,
private val result: Int
) {
fun divideTest() {
assertEquals(Calculator.divide(num1, num2), result)
companion object {
fun testData(): Array<Array<Any>> {
return arrayOf<Array<Any>>(
arrayOf(10, 2, 5),
arrayOf(8, 4, 2),
arrayOf(100, 5, 20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.