public void Before_each() { //NOTE: yes, I did not use an interface here - please see the readme var calculatorModel = new BonusPoolCalculatorModel { AllEmployees = new List <Employee> { new Employee { Id = 0, FullName = "Alf Stokes", Salary = 10000 }, new Employee { Id = 1, FullName = "Bender Rodriguez", Salary = 1000 } } }; _mockIndexService = Substitute.For <IBonusPoolIndexService>(); _mockIndexService.GenerateIndexModel().Returns(calculatorModel); _mockCalculatorService = Substitute.For <IBonusPoolCalculatorService>(); _controller = new BonusPoolController(_mockIndexService, _mockCalculatorService); }
public BonusPoolController(IBonusPoolIndexService indexService, IBonusPoolCalculatorService calculatorService) { _indexService = indexService; _calculatorService = calculatorService; }