public void IsSelect_ThresholdIsRange_ThrowD028()
            {
                _valueType = DoDHelper.ValueTypeSelect;
                var threshold = new ThresholdDummy();

                threshold.SetIsRange(true);

                _thresholds = new List <Threshold>()
                {
                    threshold
                };

                Action action = ValidateThresholds;

                action.Should().ThrowExactly <DomainException>().And.Code.Should().Be(DomainError.D028.ToString());
            }
            public void IsNumber_ThresholdIsRange_PassTest()
            {
                _valueType = DoDHelper.ValueTypeNumber;
                var threshold = new ThresholdDummy();

                threshold.SetIsRange(true);

                _thresholds = new List <Threshold>()
                {
                    threshold
                };

                Action action = ValidateThresholds;

                action.Should().NotThrow();
            }
            public void IsNumber_ThresholdIsNotRange_ThrowD026()
            {
                _valueType = DoDHelper.ValueTypeNumber;
                var threshold = new ThresholdDummy();

                threshold.SetIsRange(false);

                _thresholds = new List <Threshold>()
                {
                    threshold
                };

                Action action = ValidateThresholds;

                action.Should().ThrowExactly <DomainException>().And.Code.Should().Be(DomainError.D026.ToString());
            }
            public void HaveSameMetricStatus_ThrowD023()
            {
                var threshold1 = new ThresholdDummy();

                threshold1.SetMetricStatusId(1);
                var threshold2 = new ThresholdDummy();

                threshold2.SetMetricStatusId(1);
                var threshold3 = new ThresholdDummy();

                threshold3.SetMetricStatusId(2);

                _thresholds = new List <Threshold>()
                {
                    threshold1, threshold2, threshold3
                };

                Action action = ThresholdMustHaveDifferentMetricStatus;

                action.Should().ThrowExactly <DomainException>().And.Code.Should().Be(DomainError.D023.ToString());
            }