samples/sidemeanings/test/org/apidesign/sidemeanings/math/FactorialTest.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 30 Oct 2014 21:30:10 +0100
changeset 409 40cabcdcd2be
permissions -rw-r--r--
Updating to NBMs from NetBeans 8.0.1 as some of them are required to run on JDK8
     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 }