Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Sends request to Start the given service
        /// </summary>
        /// <param name="serviceName"></param>
        private void StartService(string serviceName)
        {
            ServiceDetails serviceDetails = null;

            foreach (var service in _services)
            {
                if (service.ServiceName.Equals(serviceName))
                {
                    serviceDetails = service;
                    break;
                }
            }

            if (serviceDetails == null)
            {
                return;
            }

            _servicesController.StartService(serviceDetails);
        }