|
30 | 30 | * <pre>
|
31 | 31 | * @RunWith(Parameterized.class)
|
32 | 32 | * public class FibonacciTest {
|
33 |
| - * @Parameters(name= "{index}: fib({0})={1}") |
34 |
| - * public static Iterable<Object[]> data() { |
35 |
| - * return Arrays.asList(new Object[][] { { 0, 0 }, { 1, 1 }, { 2, 1 }, |
| 33 | + * @Parameters(name= "{index}: fib[{0}]={1}") |
| 34 | + * public static Iterable<Object[]> data() { |
| 35 | + * return Arrays.asList(new Object[][] { { 0, 0 }, { 1, 1 }, { 2, 1 }, |
36 | 36 | * { 3, 2 }, { 4, 3 }, { 5, 5 }, { 6, 8 } });
|
37 | 37 | * }
|
38 | 38 | *
|
39 |
| - * private int fInput; |
| 39 | + * private int fInput; |
40 | 40 | *
|
41 |
| - * private int fExpected; |
| 41 | + * private int fExpected; |
42 | 42 | *
|
43 |
| - * public FibonacciTest(int input, int expected) { |
44 |
| - * fInput= input; |
45 |
| - * fExpected= expected; |
| 43 | + * public FibonacciTest(int input, int expected) { |
| 44 | + * fInput= input; |
| 45 | + * fExpected= expected; |
46 | 46 | * }
|
47 | 47 | *
|
48 |
| - * @Test |
49 |
| - * public void test() { |
50 |
| - * assertEquals(fExpected, Fibonacci.compute(fInput)); |
| 48 | + * @Test |
| 49 | + * public void test() { |
| 50 | + * assertEquals(fExpected, Fibonacci.compute(fInput)); |
51 | 51 | * }
|
52 | 52 | * }
|
53 | 53 | * </pre>
|
|
85 | 85 | * public static Iterable<Object[]> data() {
|
86 | 86 | * return Arrays.asList(new Object[][] { { 0, 0 }, { 1, 1 }, { 2, 1 },
|
87 | 87 | * { 3, 2 }, { 4, 3 }, { 5, 5 }, { 6, 8 } });
|
88 |
| - * } |
| 88 | + * } |
| 89 | + * |
89 | 90 | * @Parameter(0)
|
90 | 91 | * public int fInput;
|
91 | 92 | *
|
|
95 | 96 | * @Test
|
96 | 97 | * public void test() {
|
97 | 98 | * assertEquals(fExpected, Fibonacci.compute(fInput));
|
98 |
| - * } |
| 99 | + * } |
99 | 100 | * }
|
100 | 101 | * </pre>
|
101 | 102 | *
|
|
0 commit comments