@Test(expected = ArithmeticException.class) // ... due to some kind of number overflow. public void test_Multiplication_Of_MinSupportingLongValue_And_2_WithExpecting_ArithmeticException() { final long arg1 = Long.MIN_VALUE; final long arg2 = 2; calculatorUnderTest.mul(arg1, arg2); }
@Test public void test_Multiplication_Of_Negative_And_Zero_Numbers() { final long arg1 = -7; final long arg2 = 0; long result = calculatorUnderTest.mul(arg1, arg2); long expectedResult = 0; assertEquals(expectedResult, result); }
@Test public void test_Multiplication_Of_Two_Positive_Numbers() { final long arg1 = 2; final long arg2 = 3; long result = calculatorUnderTest.mul(arg1, arg2); long expectedResult = 6; assertEquals(expectedResult, result); }