internal void Should_CanProcessUpdate(DateTime currentDateTime, List <int> allowedUpdateUtcHours, UpdateService.UpdateEventInfo updateEventInfo, TimeSpan updateFrequency, bool expectedResult) { // Arrage var dateTimeProxy = Mock.Of <IDateTimeProxy>(x => x.UtcNow == currentDateTime); var sut = new UpdateService(string.Empty, ArchiveDirectoryPath, new DbContextFactory <UpdateDbContext>(), dateTimeProxy, ActivatorProxy.Instance); // Act var result = sut.CanProcessUpdate(updateFrequency, allowedUpdateUtcHours, updateEventInfo); // Assert Assert.Equal(expectedResult, result); }
internal void Should_CanProcessUpdate(DateTime currentDateTime, List<int> allowedUpdateUtcHours, UpdateService.UpdateEventInfo updateEventInfo, TimeSpan updateFrequency, bool expectedResult) { // Arrage var dateTimeProxy = Mock.Of<IDateTimeProxy>(x => x.UtcNow == currentDateTime); var sut = new UpdateService(string.Empty, ArchiveDirectoryPath, new DbContextFactory<UpdateDbContext>(), dateTimeProxy, ActivatorProxy.Instance); // Act var result = sut.CanProcessUpdate(updateFrequency, allowedUpdateUtcHours, updateEventInfo); // Assert Assert.Equal(expectedResult, result); }