示例#1
0
 public void Should_return_transaction_object_with_parameters()
 {
     ITransaction transaction = new Transaction(
         123, TransactionCode.COM, 123456, 123.32, System.DateTime.Parse("6/24/2009"), System.DateTime.Parse("6/24/2009"), null, 0);
     Assert.IsNotNull(transaction);
     Assert.Equals(transaction.ClaimHeaderKey, 123456);
 }
示例#2
0
 public void Should_return_transaction_object_with_payment_properties_when_passed_commission_transaction_code()
 {
     ITransaction transaction = new Transaction(
         123, TransactionCode.COM, 123456, 123.32, System.DateTime.Parse("6/24/2009"), System.DateTime.Parse("6/24/2009"), null, 0);
     Assert.IsNotNull(transaction);
     Assert.AreSame(transaction.TransactionCode.ToString(), TransactionCode.COM.ToString());
     Assert.AreSame(transaction.TransactionCategory.ToString(), TransactionCategory.PYMT.ToString());
     Assert.AreSame(transaction.TransactionType.ToString(), TransactionType.P.ToString());
 }
示例#3
0
 public void Should_return_transaction_object()
 {
     ITransaction transaction = new Transaction();
     Assert.IsNotNull(transaction);
 }
示例#4
0
 private static IList<ITransaction> CreateTransactionsFromPayments(
     // ReSharper disable SuggestBaseTypeForParameter
     IList<PaymentDTO> paymentDtos
     // ReSharper restore SuggestBaseTypeForParameter
     , TransactionCode transactionCode
     , DateTime transactionDate
     , DateTime transactionARDate
     , int unidentifiedMoneyKey)
 {
     if (paymentDtos == null) throw new ArgumentNullException("paymentDtos");
     IList<ITransaction> transactions = new List<ITransaction>();
     foreach (PaymentDTO paymentDTO in paymentDtos)
     {
         ITransaction transaction = new Transaction(
             0
             , transactionCode
             , paymentDTO.ClaimHeaderKey
             , paymentDTO.Amount
             , transactionDate
             , transactionARDate
             , null
             , unidentifiedMoneyKey
             );
         transactions.Add(transaction);
     }
     return transactions;
 }