@Test public void testFactorial() { Factorial factorial = new Factorial(); long factorial_from_0 = factorial.factorial(0); long factorial_from_1 = factorial.factorial(1); long factorial_from_5 = factorial.factorial(5); long factorial_from_10 = factorial.factorial(10); assertEquals(1, factorial_from_0); assertEquals(1, factorial_from_1); assertEquals(120, factorial_from_5); assertEquals(3628800, factorial_from_10); }
public long factorial(int number) { if (number <= 1) { return 1; } return number * factorial(number - 1); }
Factorial { public long factorial(int number) { if (number <= 1) { return 1; } return number * factorial(number - 1); } }
Factorial { public long factorial(int number) { if (number <= 1) { return 1; } return number * factorial(number - 1); }  }
Factorial { public long factorial(int number) { if (number <= 1) { return 1; } return number * factorial(number - 1); }  long factorial(int number); }
Factorial { public long factorial(int number) { if (number <= 1) { return 1; } return number * factorial(number - 1); }  long factorial(int number);  }