samples/composition/src-test/api/FactorialTest.java
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 10:04:53 +0200
changeset 210 acf2c31e22d4
parent 209 1c999569643b
child 263 7e8e995065c5
permissions -rw-r--r--
Merge: Geertjan's changes to the end of the chapter
     1 /*
     2  * Žluťoučký kůň je naše hříbátko.
     3  * and open the template in the editor.
     4  */
     5 
     6 package api;
     7 
     8 import junit.framework.TestCase;
     9 
    10 /**
    11  *
    12  * @author Jaroslav Tulach <jtulach@netbeans.org>
    13  */
    14 public class FactorialTest extends TestCase {
    15     
    16     public FactorialTest(String testName) {
    17         super(testName);
    18     }            
    19 
    20     @Override
    21     protected void setUp() throws Exception {
    22         super.setUp();
    23     }
    24 
    25     @Override
    26     protected void tearDown() throws Exception {
    27         super.tearDown();
    28     }
    29     
    30     public void testFactorial3() {
    31         assertEquals(6, Factorial.factorial(3));
    32     }
    33     
    34     public void testFactorial4() {
    35         assertEquals(24, Factorial.factorial(4));
    36     }
    37     
    38     public void testFactorial5() {
    39         assertEquals(120, Factorial.factorial(5));
    40     }
    41 }