package ru.revdaalex.oodsrp;

import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

/**
 * Created by revdaalex on 09.06.2016.
 */
public class CalculatorTest {
    private static Calculator calculator;

    /**
     *Initialization Calculator object.
     */
    @BeforeClass
    public static void runTest(){
        calculator = new Calculator();
    }

    /**
     * Test add method.
     * @throws Exception
     */
    @Test
    public void add() throws Exception {
        int test = calculator.add(30, 27);
        Assert.assertEquals(test, 57);
    }

    /**
     * Test sub method.
     * @throws Exception
     */
    @Test
    public void sub() throws Exception {
        int test = calculator.sub(200, 50);
        Assert.assertEquals(test, 150);
    }

    /**
     * Test mult method.
     * @throws Exception
     */
    @Test
    public void mult() throws Exception {
        int test = calculator.mult(537, 34);
        Assert.assertEquals(test, 18258);
    }

    /**
     * Test div method.
     * @throws Exception
     */
    @Test
    public void div() throws Exception {
        int test = calculator.div(2000, 50);
        Assert.assertEquals(test, 40);
    }

}

@@ -102,19 +102,79 @@
 .Test;%0A%0A
-/**
+import static org.hamcrest.core.Is.is;%0A%0A/**%0A * Calculator test.
 %0A * Crea
@@ -551,35 +551,38 @@
 ption %7B%0A        
-int
+double
  test = calculat
@@ -622,23 +622,27 @@
 sert
-Equals
+That
 (test, 
-57
+is(57.0)
 );%0A 
@@ -763,35 +763,38 @@
 ption %7B%0A        
-int
+double
  test = calculat
@@ -835,24 +835,28 @@
 sert
-Equals
+That
 (test, 
-150
+is(150.0)
 );%0A 
@@ -979,35 +979,38 @@
 ption %7B%0A        
-int
+double
  test = calculat
@@ -1052,26 +1052,30 @@
 sert
-Equals
+That
 (test, 
+is(
 18258
+.0)
 );%0A 
@@ -1208,11 +1208,14 @@
     
-int
+double
  tes
@@ -1269,23 +1269,27 @@
 sert
-Equals
+That
 (test, 
-40
+is(40.0)
 );%0A 

update CalculatorTest.java