| 8 | import static com.google.common.truth.Truth.assertThat; |
| 9 | |
| 10 | @TestMethodOrder(MethodOrderer.OrderAnnotation.class) |
| 11 | public class ArithmeticTest { |
| 12 | |
| 13 | /** Performs a few arbitrary tests to see if the product method is |
| 14 | * correct */ |
| 15 | @Test |
| 16 | @Order(0) |
| 17 | @DisplayName("Test product correctness") |
| 18 | public void testProduct() { |
| 19 | assertThat(Arithmetic.product(5, 6)).isEqualTo(30); |
| 20 | assertThat(Arithmetic.product(5, -6)).isEqualTo(-30); |
| 21 | assertThat(Arithmetic.product(0, -6)).isEqualTo(0); |
| 22 | } |
| 23 | |
| 24 | /** Performs a few arbitrary tests to see if the sum method is correct */ |
| 25 | @Test |
| 26 | @Order(1) |
| 27 | @DisplayName("Test sum correctness") |
| 28 | public void testSum() { |
| 29 | assertThat(Arithmetic.sum(5, 6)).isEqualTo(11); |
| 30 | assertThat(Arithmetic.sum(5, -6)).isEqualTo(-1); |
| 31 | assertThat(Arithmetic.sum(0, -6)).isEqualTo(-6); |
| 32 | assertThat(Arithmetic.sum(6, -6)).isEqualTo(0); |
| 33 | } |
| 34 | } |
nothing calls this directly
no outgoing calls
no test coverage detected