Commit 547e4233 authored by Dominik Vayhinger's avatar Dominik Vayhinger
Browse files

Initial Commit

parents
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Created by benno on 20.11.16.
*/
public class CalculatorSecondTest {
private Calculator calculator = new Calculator();
@Test
public void add2() throws Exception {
assertEquals(5, calculator.add(2, 3), 0.1);
}
@Test
public void sub2() throws Exception {
assertEquals(-1, calculator.sub(2, 3), 0.1);
}
@Test
public void mult2() throws Exception {
assertEquals(15, calculator.mult(5, 2), 0.1);
}
@Test
public void div2() throws Exception {
assertEquals(5, calculator.div(15, 3), 0.1);
}
@Test
public void sum2() throws Exception {
assertEquals(12, calculator.sum(3, 4, 5), 0.1);
}
}
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Created by benno on 20.11.16.
*/
public class CalculatorTest {
private Calculator calculator = new Calculator();
@Test
public void add() throws Exception {
assertEquals(5, calculator.add(2, 3), 0.1);
}
@Test
public void sub() throws Exception {
assertEquals(-1, calculator.sub(2, 3), 0.1);
}
@Test
public void mult() throws Exception {
assertEquals(15, calculator.mult(5, 3), 0.1);
}
@Test
public void div() throws Exception {
assertEquals(5, calculator.div(15, 3), 0.1);
}
@Test
public void sum() throws Exception {
assertEquals(12, calculator.sum(3, 4, 5), 0.1);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment