package ru.revdaalex.oodsrp;

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

/**
 * Created by revdaalex on 09.06.2016.
 */
public class CalculatorTest {
    Calculator calculator= new Calculator();

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

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

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

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

}
@@ -48,16 +48,46 @@
 Assert;%0A
+import org.junit.BeforeClass;%0A
 import o
@@ -183,16 +183,31 @@
 t %7B%0A    
+private static 
 Calculat
@@ -223,28 +223,226 @@
 ator
-= new Calculator();%0A
+;%0A%0A    /**%0A     *Initialization Calculator object%0A     */%0A    @BeforeClass%0A    public static void runTest()%7B%0A        calculator = new Calculator();%0A    %7D%0A%0A    /**%0A     * Test add method%0A     * @throws Exception%0A     */
 %0A   
@@ -570,32 +570,96 @@
 st, 57);%0A    %7D%0A%0A
+    /**%0A     * Test sub method%0A     * @throws Exception%0A     */%0A
     @Test%0A    pu
@@ -776,32 +776,97 @@
 t, 150);%0A    %7D%0A%0A
+    /**%0A     * Test mult method%0A     * @throws Exception%0A     */%0A
     @Test%0A    pu
@@ -991,24 +991,88 @@
 58);%0A    %7D%0A%0A
+    /**%0A     * Test div method%0A     * @throws Exception%0A     */%0A
     @Test%0A  

update CalculatorTest.java