samples/composition/src-test/org/apidesign/math/test/FactorialTest.java
author Jaroslav Tulach <jtulach@netbeans.org>
Sun, 06 Oct 2013 22:05:14 +0200
changeset 407 e1439046d96e
permissions -rw-r--r--
Looks like scala change URLs of its releases
     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.math.test;
     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         if (Boolean.getBoolean("no.failures")) return;
    32         assertEquals(6, Factorial.factorial(3));
    33     }
    34     
    35     public void testFactorial4() {
    36         if (Boolean.getBoolean("no.failures")) return;
    37         assertEquals(24, Factorial.factorial(4));
    38     }
    39     
    40     public void testFactorial5() {
    41         if (Boolean.getBoolean("no.failures")) return;
    42         assertEquals(120, Factorial.factorial(5));
    43     }
    44 }