Exemplo n.º 1
0
        public void CalculatePotentilRiskFactors_Scenario_CheckFactorsValue(
            double pas, double alpha,
            double prbia, double prbiaid, double prcompl)
        {
            WeightFraction PAS = new WeightFraction(pas);

            CorrectionFactor Alpha = new CorrectionFactor(alpha);

            Requirement req = new Requirement(101, PAS, Alpha, true, new int[38]
            {
                3, 1, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
            });

            List <int> totals = new List <int>(new int[38]
            {
                17, 13, 7, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
            });

            req.CalculatePotentialRisk(totals);

            R2(req.PotentialRiskBIA).Should().Be(prbia);
            R2(req.PotentialRiskBIAID).Should().Be(prbiaid);
            R2(req.PotentialRiskCOMPL).Should().Be(prcompl);
        }