/** * Test for subtract method. * * @param firstNum - first number for calculation * @param secondNum - second number for calculation * @param valid - valid result after subtraction */ @Test(dataProvider = "validSubtractData") public void subtractTest(int firstNumber, int secondNumber, int valid) { int result = proxyObject.subtract(firstNumber, secondNumber); Assert.assertEquals(result, valid); }
/** * Test for multiply method. * * @param firstNum - first number for calculation * @param secondNum - second number for calculation * @param valid - valid result after multiplication */ @Test(dataProvider = "validMultiplyData") public void multyTest(int firstNumber, int secondNumber, int valid) { int result = proxyObject.multy(firstNumber, secondNumber); Assert.assertEquals(result, valid); }
/** * Test for add method. * * @param firstNum - first number for calculation * @param secondNum - second number for calculation * @param valid - valid result after addition */ @Test(dataProvider = "validAddData") public void addTest(int firstNumber, int secondNumber, int valid) { int result = proxyObject.add(firstNumber, secondNumber); Assert.assertEquals(result, valid); }