public void PayslipInValidInputTest() { var payslipController = new PayslipController(_payslipService); var result = payslipController.Generatepayslip("David,Rudd,6,,dsf,0050,9%,01 March – 31 March"); Assert.IsNotNull(result); Assert.IsInstanceOf <BadRequestObjectResult>(result); }
public void PayslipValidInputTest() { var payslipController = new PayslipController(_payslipService); var result = payslipController.Generatepayslip("David,Rudd,60050,9%,01 March – 31 March"); Assert.IsNotNull(result); Assert.IsInstanceOf <OkObjectResult>(result); var response = result as OkObjectResult; Assert.AreEqual("David Rudd,01 March – 31 March,5004,922,4082,450", response.Value); }