public TestController() { Log.Instance = new TestLogger(); // Create root services first. var systemInformationService = new SystemInformationService(); var apiService = new ApiService(); ApiService = new ApiService(); BackupService = new BackupService(); StorageService = new StorageService(); TimerService = new TestTimerService(); DaylightService = new TestDaylightService(); DateTimeService = new TestDateTimeService(); SettingsService = new SettingsService(BackupService, StorageService); ResourceService = new ResourceService(BackupService, StorageService, SettingsService); SchedulerService = new SchedulerService(TimerService, DateTimeService); NotificationService = new NotificationService(DateTimeService, ApiService, SchedulerService, SettingsService, StorageService, ResourceService); SystemEventsService = new SystemEventsService(this, NotificationService, ResourceService); AutomationService = new AutomationService(SystemEventsService, systemInformationService, apiService); ComponentService = new ComponentService(SystemEventsService, systemInformationService, apiService, SettingsService); AreaService = new AreaService(ComponentService, AutomationService, SystemEventsService, systemInformationService, apiService, SettingsService); }