BAEL-1857 Running Parallel JUnit Tests with Maven

This commit is contained in:
josephine-barboza 2018-07-31 02:26:30 +05:30 committed by José Carlos Valero Sánchez
parent be6d6cff8c
commit ff1b1fc8f4
3 changed files with 58 additions and 11 deletions

View File

@ -0,0 +1,29 @@
package com.baeldung;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class MathFunctionTest {
@Test
public void test_addingIntegers_returnsSum() throws InterruptedException {
assertEquals(22, Math.addExact(10, 12));
}
@Test
public void test_multiplyingIntegers_returnsProduct() {
assertEquals(120, Math.multiplyExact(10, 12));
}
@Test
public void test_subtractingIntegers_returnsDifference() {
assertEquals(2, Math.subtractExact(12, 10));
}
@Test
public void test_minimumInteger() {
assertEquals(10, Math.min(10, 12));
}
}

View File

@ -0,0 +1,18 @@
package com.baeldung;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class StringFunctionTest {
@Test
public void test_upperCase() {
assertEquals("TESTCASE", "testCase".toUpperCase());
}
@Test
public void test_indexOf() {
assertEquals(1, "testCase".indexOf("e"));
}
}