public void Analyze_GivenSet_ExceptedCalculatedValues()
        {
            _elements.CalculatePerimeterRiskFactorsAndUpdateAbsentElements();

            // Incomplete + Complete elements
            _elements.CountOfIncompleteAndComplete.Should().Be(8);
            _elements.PotentialRiskOfIncompleteAndComplete.Should().Be(4120);

            // Complete
            _elements.PotentialRiskOfComplete.Should().Be(2920);

            // C3
            _elements.CountOfC3Class.Should().Be(4);
            _elements.PotentialRiskOfC3Class.Should().Be(3120);

            // Functional Perimeter Analysis
            _elements.AveragePotentialRisk.Should().Be(515);
            _elements.AveragePotentialRiskOfC3Class.Should().Be(780);

            // Totals
            _elements.TotalPotentialRisk.Should().Be(5150);
            _elements.TotalManagedRisk.Should().Be(1337);

            // Percentages factor
            R2(_elements.FractionOfIncompleteAndComplete).Should().Be(0.80);
            R2(_elements.ManagedRiskReductionFactor).Should().Be(0.46);
        }
Beispiel #2
0
        public WhatIfEngine(ElementsSet elements)
        {
            _elements = elements;

            _elements.CalculatePerimeterRiskFactorsAndUpdateAbsentElements();
        }