private void UpdateStatus() { var catlightStatus = _catlightConnector.GetStatus(); switch (catlightStatus) { case CatlightStatus.CatlightNotFound: _busylightLyncController.Light(BusylightColor.Blue); break; case CatlightStatus.NoProjects: _busylightLyncController.Light(BusylightColor.Off); break; case CatlightStatus.Ok: case CatlightStatus.Info: _busylightLyncController.Light(BusylightColor.Green); break; case CatlightStatus.WarningAcknowledged: case CatlightStatus.CriticalAcknowledged: _busylightLyncController.Light(BusylightColor.Yellow); break; case CatlightStatus.Warning: case CatlightStatus.Critical: _busylightLyncController.Light(BusylightColor.Red); break; default: throw new ArgumentOutOfRangeException(); } }
public void CallStatus_StopwatchTime() { var stopwatch = new Stopwatch(); stopwatch.Start(); var connector = new CatlightConnector(); var catlightStatus = connector.GetStatus(); stopwatch.Stop(); var catlightStatusElapsedTime = stopwatch.Elapsed; Debug.WriteLine($"catlightStatus = {catlightStatus} in {catlightStatusElapsedTime}"); }
public void CallStatus_ThrowsNoException() { var connector = new CatlightConnector(); var status = connector.GetStatus(); }