Created
April 16, 2018 18:47
-
-
Save rozkminiacz/e19996cdb0299d91262876be0134c9b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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