public void StartMarketDataService_Success() { var availableService = _servicesController.GetAvailableServices(); var marketService = availableService.FirstOrDefault( provider => provider.ServiceName.Equals("MarketDataService")); _servicesController.StartService(marketService); Thread.Sleep(61000); Assert.IsTrue(marketService.Status.Equals(Common.Constants.ServiceStatus.Running)); }
/// <summary> /// Populated initial services information to be displayed on UI /// </summary> private void PopulateServices() { var availableServices = _servicesController.GetAvailableServices(); foreach (var availableService in availableServices) { Services.Add(availableService); // Test Code if (availableService.Status != ServiceStatus.Disabled) { availableService.Status = ServiceStatus.Stopped; } //NOTE: Test code to simulate Service Start // BEGIN: //availableService.Status = ServiceStatus.Starting; //availableService.Status = ServiceStatus.Running; // :END EventSystem.Publish <ServiceDetails>(availableService); } ////NOTE: To be disbaled for testing InitializeServices(); }