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