Skip to content

Commit 8e507ca

Browse files
josephine-barbozaCalamarBicefalo
authored andcommitted
BAEL-1857
1 parent 9379e84 commit 8e507ca

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.baeldung;
2+
3+
import static org.junit.Assert.assertEquals;
4+
5+
import org.junit.Test;
6+
7+
public class ArithmeticFunctionTest {
8+
9+
@Test
10+
public void test_addingIntegers_returnsSum() {
11+
assertEquals(22, Math.addExact(10, 12));
12+
}
13+
14+
@Test
15+
public void test_multiplyingIntegers_returnsProduct() {
16+
assertEquals(120, Math.multiplyExact(10, 12));
17+
}
18+
19+
@Test
20+
public void test_subtractingIntegers_returnsDifference() {
21+
assertEquals(2, Math.subtractExact(12, 10));
22+
}
23+
24+
@Test
25+
public void test_minimumInteger() {
26+
assertEquals(10, Math.min(10, 12));
27+
}
28+
}

0 commit comments

Comments
 (0)