author | Jaroslav Tulach <jtulach@netbeans.org> |
Fri, 27 Mar 2009 20:30:39 +0100 | |
changeset 325 | 4553c2885ce6 |
permissions | -rw-r--r-- |
jtulach@325 | 1 |
/* |
jtulach@325 | 2 |
* Žluťoučký kůň je naše hříbátko. |
jtulach@325 | 3 |
* and open the template in the editor. |
jtulach@325 | 4 |
*/ |
jtulach@325 | 5 |
|
jtulach@325 | 6 |
package org.apidesign.sidemeanings.math; |
jtulach@325 | 7 |
|
jtulach@325 | 8 |
import org.junit.Assert; |
jtulach@325 | 9 |
import org.junit.Before; |
jtulach@325 | 10 |
import org.junit.Test; |
jtulach@325 | 11 |
|
jtulach@325 | 12 |
/** |
jtulach@325 | 13 |
* |
jtulach@325 | 14 |
* @author Jaroslav Tulach <jtulach@netbeans.org> |
jtulach@325 | 15 |
*/ |
jtulach@325 | 16 |
public class FactorialTest { |
jtulach@325 | 17 |
Factorial instance; |
jtulach@325 | 18 |
|
jtulach@325 | 19 |
@Before |
jtulach@325 | 20 |
public void setUp() { |
jtulach@325 | 21 |
instance = new Factorial(); |
jtulach@325 | 22 |
} |
jtulach@325 | 23 |
|
jtulach@325 | 24 |
@Test |
jtulach@325 | 25 |
public void testFactorial3() { |
jtulach@325 | 26 |
Assert.assertEquals(6, instance.factorial(3)); |
jtulach@325 | 27 |
} |
jtulach@325 | 28 |
|
jtulach@325 | 29 |
@Test |
jtulach@325 | 30 |
public void testFactorial4() { |
jtulach@325 | 31 |
Assert.assertEquals(24, instance.factorial(4)); |
jtulach@325 | 32 |
} |
jtulach@325 | 33 |
|
jtulach@325 | 34 |
@Test |
jtulach@325 | 35 |
public void testFactorial5() { |
jtulach@325 | 36 |
Assert.assertEquals(120, instance.factorial(5)); |
jtulach@325 | 37 |
} |
jtulach@325 | 38 |
} |