Skip to content

Instantly share code, notes, and snippets.

@dnno
Created June 2, 2019 18:58
Show Gist options
  • Select an option

  • Save dnno/d422ecd8157ad2fcfa5519c5a992ff6c to your computer and use it in GitHub Desktop.

Select an option

Save dnno/d422ecd8157ad2fcfa5519c5a992ff6c to your computer and use it in GitHub Desktop.
public class FibonacciTest {
@Parameters
public static Collection<object[]> data() {
return Arrays.asList(new Object[][] {
{0,0},{1,1},{2,1},{3,2} })};
private int input, expected;
public FibonacciTest(int input, int expected) {
this.input = input; this.expected = expected;
}
@Test
public void test() {
assertEquals(expected, Fibonacci.compute(input));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment