package gseproject.experiments;

import static junit.Assert.*;
import junit.*;

public class MathFuncTest {

	private MathFunc math;

    @Before
    public void init() { math = new MathFunc(); }
    @After
    public void tearDown() { math = null; }

    @Test
    public void calls() {
        assertEquals(0, math.getCalls());

        math.factorial(1);
        assertEquals(1, math.getCalls());

        math.factorial(1);
        assertEquals(2, math.getCalls());
    }

    @Test
    public void factorial() {
        assertTrue(math.factorial(0) == 1);
        assertTrue(math.factorial(1) == 1);
        assertTrue(math.factorial(5) == 120);
    }

    @Test(expected = IllegalArgumentException.class)
    public void factorialNegative() {
        math.factorial(-1);
    }

    @Ignore
    @Test
    public void todo() {
        assertTrue(math.plus(1, 1) == 3);
    }

}

@@ -42,16 +42,31 @@
  static 
+gseproject.lib.
 junit.As
@@ -81,16 +81,31 @@
 %0Aimport 
+gseproject.lib.
 junit.*;

Update MathFuncTest.java