Skip to content

Instantly share code, notes, and snippets.

@rozkminiacz
Created April 16, 2018 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rozkminiacz/e19996cdb0299d91262876be0134c9b1 to your computer and use it in GitHub Desktop.
Save rozkminiacz/e19996cdb0299d91262876be0134c9b1 to your computer and use it in GitHub Desktop.
@RunWith(Parameterized::class)
class FibonacciTest(private val fInput: Int, private val fExpected: Int) {
@Test
fun test() {
assertEquals(fExpected, Fibonacci.compute(fInput))
}
companion object {
@JvmStatic
@Parameterized.Parameters
fun data(): Collection<Array<Any>> {
return listOf(
arrayOf<Any>(0, 0),
arrayOf<Any>(1, 1),
arrayOf<Any>(2, 1),
arrayOf<Any>(3, 2),
arrayOf<Any>(4, 3),
arrayOf<Any>(5, 5),
arrayOf<Any>(6, 8)))
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment