public void GetResidualRisk_GivenCase_ExpectedResult(TestCase testCase, int expectedResidualRisk)
        {
            CompleteElement element = CompleteElementBuilder.CreateCase(testCase);

            double result = element.GetResidualRisk();

            R0(result).Should().Be(expectedResidualRisk);
        }
        public void GetManagedRiskBIAAndCOMPL_GivenCase_ExpectedResult(
            TestCase testCase, int expectedManagedRiskBIA, int exptectedManagedRiskCOMPL)
        {
            CompleteElement element = CompleteElementBuilder.CreateCase(testCase);

            double managedRiskBIA   = element.GetManagedRiskBIA();
            double managedRiskCOMPL = element.GetManagedRiskCOMPL();

            R0(managedRiskBIA).Should().Be(expectedManagedRiskBIA);
            R0(managedRiskCOMPL).Should().Be(exptectedManagedRiskCOMPL);
        }
        public void GetVEFDistrib_GivenCase_ExpectedResult(TestCase testCase, double vef)
        {
            CompleteElement element = CompleteElementBuilder.CreateCase(testCase);

            element.SetVEF(vef);  // Setting VEF automatically force risk calculation of PDS

            Dictionary <long, double[]> distribution = element.GetPotentialRiskDistributionFactors();

            ExtractVEF(distribution).Should().Equal(new Dictionary <long, double>
            {
                { 101, 20270.27 },
                { 102, 18918.92 },
                { 103, 2702.70 },
                { 104, 2702.70 },
                { 105, 5405.41 },
            });
        }