public SicknessServiceTests() { _dbMock = new Mock <FestispecContext>(); var modelMocks = new ModelMocks(); _dbMock.Setup(x => x.Employees).Returns(MockHelpers.CreateDbSetMock(modelMocks.Employees).Object); _dbMock.Setup(x => x.Availabilities) .Returns(MockHelpers.CreateDbSetMock(modelMocks.Availabilities).Object); _dbMock.Setup(x => x.PlannedEvents).Returns(MockHelpers.CreateDbSetMock(modelMocks.PlannedEvents).Object); _dbMock.Setup(m => m.SaveChangesAsync()).ReturnsAsync(1); _sicknessService = new SicknessService(_dbMock.Object); }
public SicknessController(ISicknessService sicknessService) { _sicknessService = sicknessService; }