Exemple #1
0
        public void HistoryTest()
        {
            PaymentPlan        target   = new PaymentPlan(); // TODO: Initialize to an appropriate value
            PlanPaymentHistory expected = null;              // TODO: Initialize to an appropriate value
            PlanPaymentHistory actual;

            target.History = expected;
            actual         = target.History;
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemple #2
0
        /// <summary>
        /// Parses a typed data set of plan payments into a <see cref="PlanPaymentHistory"/> collection.
        /// </summary>
        /// <param name="ds">The typed data set to parse.</param>
        /// <returns>A collection representing the data contained in the data set.</returns>
        private PlanPaymentHistory ParsePlanPaymentHistory(PaymentPlanTds ds)
        {
            PlanPaymentHistory history = new PlanPaymentHistory(ds.PlanPayments.Count);

            foreach (PaymentPlanTds.PlanPaymentsRow row in ds.PlanPayments.Rows)
            {
                ushort checkNumber;
                if (ushort.TryParse(row.CheckNumber, out checkNumber))
                {
                    history.Add(new PlanPayment()
                    {
                        Amount      = Convert.ToUInt32(row.Amount),
                        CheckNumber = checkNumber,
                        Date        = row.Date,
                        Type        = CPConvert.ToPaymentType(row.TransactionCode.Trim())
                    });
                }
            }
            return(history);
        }