public void ThenUpdatedComputedPaymentStreamNumberValueShouldDisplayOnArmBestCase()
        {
            TotalValueDifference = 0;
            for (var rowIndex = 0; rowIndex < TridVariable.AbcPaymentStreamNo.Count - 1; rowIndex++)
            {
                AbcPaymentScheduleGridElements(rowIndex + 1);
                try
                {
                    var actualValue =
                        Math.Round(ProjActions.GetNumericValueFromString(UIActions.GetText(AbcPaymentStreamNumber)), 2);
                    var expectedValue = Math.Round(Convert.ToDouble(TridVariable.AbcPaymentStreamNo[rowIndex]), 2);
                    ValueDifference = Math.Abs(expectedValue - actualValue);
                    Assert.AreEqual(expectedValue, actualValue,
                                    "Actual value does not match as expected for the row {0} with the difference of {1}",
                                    rowIndex + 1, ValueDifference);

                    Console.WriteLine("===========================================================");
                    Console.WriteLine("ExpectedValue Row {0} :{1}", rowIndex + 1, expectedValue);
                    Console.WriteLine("ActualValue Row {0} :{1}", rowIndex + 1, actualValue);
                    Console.WriteLine("============================================================");
                }
                catch (Exception e)
                {
                    TotalValueDifference = 1;
                    Console.WriteLine(e);
                    TestCaseStatus    = false;
                    TestFailureCount += 1;
                    CardsFailure     += "|| AbcPaymentStreamNo[" + (rowIndex + 1) + "] || : " + e +
                                        " \n ====================================================================================\n";
                }
            }
        }
Exemplo n.º 2
0
        public void ThenUpdatedComputedInsuranceLowBalanceValueShouldDisplayOnEscrowInfo()
        {
            try
            {
                var expectedInfoValue = Math.Round(Convert.ToDouble(TridVariable.InsLowBalance), 2);
                var actualInfoValue   = Math.Round(ProjActions.GetNumericValueFromString(UIActions.GetText(InsLowBalance)), 2);
                ValueDifference = Math.Abs(expectedInfoValue - actualInfoValue);
                Assert.AreEqual(expectedInfoValue, actualInfoValue, "Insurance Low Balance value does not match as expected with the difference of {0}", ValueDifference);

                Console.WriteLine("===========================================================");
                Console.WriteLine("ExpectedInfoValue :{0}", expectedInfoValue);
                Console.WriteLine("ActualInfoValue :{0}", actualInfoValue);
                Console.WriteLine("============================================================");

                ProjActions.CreateCsvFile(ValueDifference.ToString());
            }
            catch (Exception e)
            {
                ProjActions.CreateCsvFile(ValueDifference.ToString());
                Console.WriteLine(e);
                TestCaseStatus    = false;
                TestFailureCount += 1;
                CardsFailure     += "|| InsuranceLowBalance || : " + e + " \n ====================================================================================\n";
            }
        }
        public void ThenUpdatedComputedNumberOfPaymentsValueShouldDisplayOnPaymentScheduleGrid()
        {
            for (var rowIndex = 0; rowIndex < TridVariable.PaymentScheduleNumberOfPayments.Count; rowIndex++)
            {
                PaymentScheduleGridElements(rowIndex + 1);
                try
                {
                    var actualValue   = Math.Round(ProjActions.GetNumericValueFromString(UIActions.GetText(PaymentScheduleNumberOfPayments)), 2);
                    var expectedValue = Math.Round(Convert.ToDouble(TridVariable.PaymentScheduleNumberOfPayments[rowIndex]), 2);
                    ValueDifference = Math.Abs(expectedValue - actualValue);
                    Assert.AreEqual(expectedValue, actualValue, "Actual value does not match as expected for the row {0} with the difference of {1}", rowIndex + 1, ValueDifference);

                    Console.WriteLine("===========================================================");
                    Console.WriteLine("ExpectedValue Row {0} :{1}", rowIndex + 1, expectedValue);
                    Console.WriteLine("ActualValue Row {0} :{1}", rowIndex + 1, actualValue);
                    Console.WriteLine("============================================================");
                    TotalValueDifference += ValueDifference;
                }
                catch (Exception e)
                {
                    TotalValueDifference += ValueDifference;
                    Console.WriteLine(e);
                    TestCaseStatus    = false;
                    TestFailureCount += 1;
                    CardsFailure     += "|| PaymentScheduleNumberOfPayments[" + rowIndex + "] || : " + e + " \n ====================================================================================\n";
                }
            }
            if (TotalValueDifference == 0)
            {
                ProjActions.CreateCsvFile("Matched");
            }
            else
            {
                ProjActions.CreateCsvFile("Not Matched");
            }
        }
 public void GivenUserHavePaymentScheduleDataFromExcelSheetForTheScenario(string sheetName, int scenarioNo)
 {
     _getData.GetExcelValues(scenarioNo, sheetName);
     ProjActions.GetSheetName(sheetName);
 }
 public void GivenUserHaveARMWorstCaseVariableLoanDataFromExcelSheetForTheScenario(string sheetName, int scenarioNo)
 {
     _getData.GetExcelValues(scenarioNo, sheetName);
     ProjActions.GetSheetName(sheetName);
 }