public HimawariService(ISateliteTimeService timeService, IDownloadService downloadService, IImageService imageService, IConfigService configService) { this.timeService = timeService; this.downloadService = downloadService; this.imageService = imageService; this.configService = configService; }
public void TestFixDate() { IServiceCollection services = new ServiceCollection(); services.AddScoped <ISateliteTimeService, SateliteTimeService>(); ServiceProvider.Init(services); ISateliteTimeService sateliteService = ServiceProvider.Locator.GetService <ISateliteTimeService>(); DateTime now = DateTime.Now; DateTime fixedDate = sateliteService.FixDate(now, "A"); Assert.IsTrue(fixedDate.Minute % 10 == 0); }