public void Notify(IBlink1 blink1, ConsolidatedStatus consolidatedStatus)
        {
            var message = $"Setting {consolidatedStatus.Color} since {consolidatedStatus.Reason}";

            switch (consolidatedStatus.BuildStatus)
            {
            case BuildStatus.Failure:
                _log.Error(message);
                blink1.SetRed();
                break;

            case BuildStatus.Success:
                _log.Success(message);
                blink1.SetGreen();
                break;

            case BuildStatus.Running:
                _log.Warning(message);
                blink1.SetOrange();
                break;

            default:
                _log.Info(message);
                blink1.SetGrey();
                break;
            }
        }
        public void Constructor_AtLeastOneUnknown_ConsolidatesToUnknown()
        {
            var sut = new ConsolidatedStatus(new List <BuildStatus> {
                BuildStatus.Unknown, BuildStatus.Success
            });

            var result = sut.BuildStatus;

            Assert.AreEqual(BuildStatus.Unknown, result);
        }
        public void Constructor_NoneFailingButAtleastOneRunning_ConsolidatesToRunning(BuildStatus buildStatus1, BuildStatus buildStatus2, BuildStatus buildStatus3, BuildStatus expected)
        {
            var sut = new ConsolidatedStatus(new List <BuildStatus> {
                buildStatus1, buildStatus2, buildStatus3
            });

            var result = sut.BuildStatus;

            Assert.AreEqual(expected, result);
        }
        public void Constructor_AllSuccess_ConsolidatesToSuccess()
        {
            var sut = new ConsolidatedStatus(new List <BuildStatus> {
                BuildStatus.Success, BuildStatus.Success, BuildStatus.Success
            });

            var result = sut.BuildStatus;

            Assert.AreEqual(BuildStatus.Success, result);
        }