Converting to ant freeform script as it allows to demonstrate the amoeba effect
2 * Žluťoučký kůň je naše hříbátko.
3 * and open the template in the editor.
8 import junit.framework.TestCase;
12 * @author Jaroslav Tulach <jtulach@netbeans.org>
14 public class FactorialTest extends TestCase {
16 public FactorialTest(String testName) {
21 protected void setUp() throws Exception {
26 protected void tearDown() throws Exception {
30 public void testFactorial3() {
31 assertEquals(6, Factorial.factorial(3));
34 public void testFactorial5() {
35 assertEquals(120, Factorial.factorial(5));
38 /** Class showing inventive, non-expected use of
39 * Arithmetica methods to do multiplication instead of
42 private static class Factorial extends Arithmetica {
43 public static int factorial(int n) {
44 return new Factorial().sumRange(1, n);
47 public int sumTwo(int one, int second) {