private void GetUnprocessedTransactions()
        {
            var outgoingSingleCreditRepository = new OutgoingSingleCreditRepository(config.T24ConnectionString());
            var listTransaction = outgoingSingleCreditRepository.GetAllOutgoingSingleCredit(TransactionStatus.Unprocessed);

            if (listTransaction.Count() > 0)
            {
                foreach (var item in listTransaction)
                {
                    try
                    {
                        var unprocessedTransaction = outgoingSingleCreditRepository
                                                        .ProcessOutgoingSingleCredit(item.TRN, item.Date);
                        log.Write("Transaction " + item.TRN + " has been processed");

                        GenerateTextFile(unprocessedTransaction);
                        Console.WriteLine();
                    }
                    catch (Exception ex)
                    {
                        log.Write("Transaction " + item.TRN + " failed to be processed\n" + ex.Message);
                    }
                }
            }
        }
        public void ProcessOutgoingSingleCreditTransactionsDateNull()
        {
            var outgoingSingleCredit = new OutgoingSingleCreditRepository(connectionString);

            var actual = outgoingSingleCredit.ProcessOutgoingSingleCredit("A01.FT151058V6RY", null);
        }
        public void ProcessOutgoingSingleCreditUnprocessedTransactionsCodeValidNoTransactionRemains()
        {
            var outgoingSingleCredit = new OutgoingSingleCreditRepository(connectionString);
            var listTransactions = outgoingSingleCredit.GetAllOutgoingSingleCredit(TransactionStatus.Unprocessed);

            foreach (var item in listTransactions)
            {
                outgoingSingleCredit.ProcessOutgoingSingleCredit(item.TRN, item.Date);
            }

            var listTransactionsAfter = outgoingSingleCredit.GetAllOutgoingSingleCredit(TransactionStatus.Unprocessed)
                                            .Where(o => o.Status == TransactionStatus.Unprocessed.ToString());

            Assert.AreEqual(0, listTransactionsAfter.Count());
        }
        public void ProcessOutgoingSingleCreditTransactionsCodeNull()
        {
            var outgoingSingleCredit = new OutgoingSingleCreditRepository(connectionString);

            var actual = outgoingSingleCredit.ProcessOutgoingSingleCredit(null, "150415");
        }