import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public final class DifferenceOfSquaresCalculatorTest {
    private DifferenceOfSquaresCalculator calculator;

    @Before
    public void setUp() {
        calculator = new DifferenceOfSquaresCalculator();
    }

    @Test
    public void testSquareOfSum5() {
        final int expected = 225;
        final int actual = calculator.computeSquareOfSumTo(5);
        assertEquals(expected, actual);
    }

    @Ignore("Remove to run test")
    @Test
    public void testSquareOfSum10() {
        final int expected = 3025;
        final int actual = calculator.computeSquareOfSumTo(10);
        assertEquals(expected, actual);
    }

    @Ignore("Remove to run test")
    @Test
    public void testSquareOfSum100() {
        final int expected = 25502500;
        final int actual = calculator.computeSquareOfSumTo(100);
        assertEquals(expected, actual);
    }

    @Ignore("Remove to run test")
    @Test
    public void testSumOfSquares5() {
        final int expected = 55;
        final int actual = calculator.computeSumOfSquaresTo(5);
        assertEquals(expected, actual);
    }

    @Ignore("Remove to run test")
    @Test
    public void testSumOfSquares10() {
        final int expected = 385;
        final int actual = calculator.computeSumOfSquaresTo(10);
        assertEquals(expected, actual);
    }

    @Ignore("Remove to run test")
    @Test
    public void testSumOfSquares100() {
        final int expected = 338350;
        final int actual = calculator.computeSumOfSquaresTo(100);
        assertEquals(expected, actual);
    }

    @Ignore("Remove to run test")
    @Test
    public void testDifferenceOfSquares0() {
        final int expected = 0;
        final int actual = calculator.computeDifferenceOfSquares(0);
        assertEquals(expected, actual);
    }

    @Ignore("Remove to run test")
    @Test
    public void testDifferenceOfSquares5() {
        final int expected = 170;
        final int actual = calculator.computeDifferenceOfSquares(5);
        assertEquals(expected, actual);
    }

    @Ignore("Remove to run test")
    @Test
    public void testDifferenceOfSquares10() {
        final int expected = 2640;
        final int actual = calculator.computeDifferenceOfSquares(10);
        assertEquals(expected, actual);
    }

    @Ignore("Remove to run test")
    @Test
    public void testDifferenceOfSquares100() {
        final int expected = 25164150;
        final int actual = calculator.computeDifferenceOfSquares(100);
        assertEquals(expected, actual);
    }

}

@@ -168,16 +168,17 @@
 rTest %7B%0A
+%0A
     priv
@@ -368,17 +368,17 @@
 areOfSum
-5
+1
 () %7B%0A   
@@ -407,11 +407,9 @@
 d = 
-225
+1
 ;%0A  
@@ -465,17 +465,17 @@
 OfSumTo(
-5
+1
 );%0A     
@@ -591,18 +591,17 @@
 areOfSum
-10
+5
 () %7B%0A   
@@ -630,10 +630,9 @@
 d = 
-30
+2
 25;%0A
@@ -690,18 +690,17 @@
 OfSumTo(
-10
+5
 );%0A     
@@ -1043,33 +1043,33 @@
 testSumOfSquares
-5
+1
 () %7B%0A        fin
@@ -1086,18 +1086,17 @@
 ected = 
-55
+1
 ;%0A      
@@ -1149,17 +1149,17 @@
 uaresTo(
-5
+1
 );%0A     
@@ -1268,34 +1268,33 @@
 testSumOfSquares
-10
+5
 () %7B%0A        fin
@@ -1311,18 +1311,17 @@
 ected = 
-38
+5
 5;%0A     
@@ -1375,18 +1375,17 @@
 uaresTo(
-10
+5
 );%0A     
@@ -1743,17 +1743,17 @@
 fSquares
-0
+1
 () %7B%0A   
@@ -1846,17 +1846,17 @@
 Squares(
-0
+1
 );%0A     
@@ -2140,250 +2140,8 @@
  %7D%0A%0A
-    @Ignore(%22Remove to run test%22)%0A    @Test%0A    public void testDifferenceOfSquares10() %7B%0A        final int expected = 2640;%0A        final int actual = calculator.computeDifferenceOfSquares(10);%0A        assertEquals(expected, actual);%0A    %7D%0A%0A
     

synchronize tests with x-common