public void TestGetServiceStatus_IISAdminRunning() { string status = _appMonitorService.GetServiceStatus(serverName, serviceName); if (status != "Running") { _appMonitorService.StartService(serverName, serviceName); } status = _appMonitorService.GetServiceStatus(serverName, serviceName); Assert.AreEqual("Running", status); Console.WriteLine(@"IISAdmin Service Status: " + status); }
public void RestartService(ApplicationService servie) { SelectedService.Status = _statusMonitorService.GetServiceStatus(SelectedService.ServerName, SelectedService.ServiceName); }