Exemple #1
0
        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);
        }
Exemple #2
0
 public SicknessController(ISicknessService sicknessService)
 {
     _sicknessService = sicknessService;
 }