1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/samples/sidemeanings/test/org/apidesign/sidemeanings/math/FactorialTest.java Fri Mar 27 20:30:39 2009 +0100
1.3 @@ -0,0 +1,38 @@
1.4 +/*
1.5 + * Žluťoučký kůň je naše hříbátko.
1.6 + * and open the template in the editor.
1.7 + */
1.8 +
1.9 +package org.apidesign.sidemeanings.math;
1.10 +
1.11 +import org.junit.Assert;
1.12 +import org.junit.Before;
1.13 +import org.junit.Test;
1.14 +
1.15 +/**
1.16 + *
1.17 + * @author Jaroslav Tulach <jtulach@netbeans.org>
1.18 + */
1.19 +public class FactorialTest {
1.20 + Factorial instance;
1.21 +
1.22 + @Before
1.23 + public void setUp() {
1.24 + instance = new Factorial();
1.25 + }
1.26 +
1.27 + @Test
1.28 + public void testFactorial3() {
1.29 + Assert.assertEquals(6, instance.factorial(3));
1.30 + }
1.31 +
1.32 + @Test
1.33 + public void testFactorial4() {
1.34 + Assert.assertEquals(24, instance.factorial(4));
1.35 + }
1.36 +
1.37 + @Test
1.38 + public void testFactorial5() {
1.39 + Assert.assertEquals(120, instance.factorial(5));
1.40 + }
1.41 +}