public void EqualsRequiredCalcModelTestFour() { var act = new RequiredCalcModel(2, 0, '/'); var controller = new CalcController(calcRepository); Assert.Throws <DevideByZeroExeption>(() => controller.ControllerOperation(act)); }
public void CalcTest2() { var requiredCalcModel = new RequiredCalcModel(); var controller = new CalcController(calcRepository); Assert.Throws <NotValidOperatorExeption>(() => controller.ControllerOperation(requiredCalcModel)); }
public void EqualsRequiredCalcModelTestThree() { var act = new RequiredCalcModel(2, 2, '='); var controller = new CalcController(calcRepository); Assert.Throws <NotValidOperatorExeption>(() => controller.ControllerOperation(act)); }
public void CalcTest1() { var requiredCalcModel = new RequiredCalcModel(); requiredCalcModel.FirstOperand = 15; requiredCalcModel.SecondOperand = 10; requiredCalcModel.Operation = '/'; calcRepository.Operations(requiredCalcModel); var controller = new CalcController(calcRepository); var act = controller.ControllerOperation(requiredCalcModel); Assert.IsType <OkObjectResult>(act); }
public void EqualsRequiredCalcModelTestFive() { var controller = new CalcController(calcRepository); Assert.Throws <ArgumentNullException>(() => controller.ControllerOperation(null)); }