Index: System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsDocumentView/ValidateSectionResultAsCombinationContributionsInFMResultView.cs =================================================================== diff -u -rcb224d44e8112cf33e20c83b2221ff5b53a8e11e -rc7688175c1fba59e7549f02085f39bc6cc38558b --- System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsDocumentView/ValidateSectionResultAsCombinationContributionsInFMResultView.cs (.../ValidateSectionResultAsCombinationContributionsInFMResultView.cs) (revision cb224d44e8112cf33e20c83b2221ff5b53a8e11e) +++ System tests/AutomatedSystemTests/AutomatedSystemTests/Modules/ActionsDocumentView/ValidateSectionResultAsCombinationContributionsInFMResultView.cs (.../ValidateSectionResultAsCombinationContributionsInFMResultView.cs) (revision c7688175c1fba59e7549f02085f39bc6cc38558b) @@ -103,10 +103,11 @@ Validate.AreEqual(actualProb.Replace(currentCulture.NumberFormat.NumberGroupSeparator, String.Empty), expectedExactProbFraction); } else { Report.Info("Expected probability (" + expectedExactProbFraction + ") is not exactly equal to actual one (" + actualProb + ")."); - Report.Info("Validatign if they are almost equal (within 0.01 %)"); - long actualNumerator = Int64.Parse(actualProb.Substring(2, actualProb.Length-2).Replace(currentCulture.NumberFormat.NumberGroupSeparator, String.Empty)); + string actualProbNoSeparators = actualProb.Replace(currentCulture.NumberFormat.NumberGroupSeparator, String.Empty); + long actualNumerator = Int64.Parse(actualProbNoSeparators.Substring(2, actualProbNoSeparators.Length-2)); double actualSumWeightedProbs = 1.0 / actualNumerator; double relativeDeviation = Math.Abs(actualSumWeightedProbs-expectedSumWeightedProbs) / expectedSumWeightedProbs; + Report.Info("Validating if actual probability (" + actualSumWeightedProbs.ToString() + ") and expected probability (" + expectedSumWeightedProbs.ToString() + ") are almost equal (within 0.01 %)."); Validate.IsTrue(relativeDeviation<0.0001); } }