jtulach@321: /* jtulach@321: * Žluťoučký kůň je naše hříbátko. jtulach@321: * and open the template in the editor. jtulach@321: */ jtulach@321: jtulach@321: package org.apidesign.math.test; jtulach@321: jtulach@321: import junit.framework.TestCase; jtulach@321: jtulach@321: /** jtulach@321: * jtulach@321: * @author Jaroslav Tulach jtulach@321: */ jtulach@321: public class FactorialTest extends TestCase { jtulach@321: jtulach@321: public FactorialTest(String testName) { jtulach@321: super(testName); jtulach@321: } jtulach@321: jtulach@321: @Override jtulach@321: protected void setUp() throws Exception { jtulach@321: super.setUp(); jtulach@321: } jtulach@321: jtulach@321: @Override jtulach@321: protected void tearDown() throws Exception { jtulach@321: super.tearDown(); jtulach@321: } jtulach@321: jtulach@321: public void testFactorial3() { jtulach@321: if (Boolean.getBoolean("no.failures")) return; jtulach@321: assertEquals(6, Factorial.factorial(3)); jtulach@321: } jtulach@321: jtulach@321: public void testFactorial4() { jtulach@321: if (Boolean.getBoolean("no.failures")) return; jtulach@321: assertEquals(24, Factorial.factorial(4)); jtulach@321: } jtulach@321: jtulach@321: public void testFactorial5() { jtulach@321: if (Boolean.getBoolean("no.failures")) return; jtulach@321: assertEquals(120, Factorial.factorial(5)); jtulach@321: } jtulach@321: }