Beispiel #1
0
        public void SetStatus_Sets_Appropriate_Status(
            MetricStatus status1,
            MetricStatus status2,
            MetricStatus status3,
            MetricStatus status4,
            NodeStatus expectedStatus)
        {
            var node = new ClusterNode
            {
                Metrics = new List <Metric>
                {
                    new Metric {
                        Status = status1
                    },
                    new Metric {
                        Status = status2
                    },
                    new Metric {
                        Status = status3
                    },
                    new Metric {
                        Status = status4
                    },
                }
            };

            node.SetStatus();

            node.Status.Should().Be(expectedStatus);
        }
Beispiel #2
0
        public void Default_Status_Is_NoThresholdsSet()
        {
            var node = new ClusterNode();

            node.SetStatus();

            node.Status.Should().Be(NodeStatus.NoThresholdsSet);
        }