public void WithoutSupplementaryDetailsOrServiceReference_IsParsedCorrectly()
        {
            var expectedTransaction = ExpectedSwiftTransaction.CreateExpected(new DateTime(2015, 1, 26), DebitCredit.Credit,
                                                                              "R", "EUR", 18790.00M, "NTRF", "PON0000002534162", null, "", "");

            var transaction = new Transaction("1501260126CR18790,00NTRFPON0000002534162", new Currency("EUR"), Mt940Test.NlCultureInfo);

            ExpectedSwiftTransaction.AssertTransaction(expectedTransaction, transaction);
        }
Example #2
0
        public void WithSupplementaryDetailsAndServiceReference_IsParsedCorrectly()
        {
            var expectedTransaction = ExpectedSwiftTransaction.CreateExpected(new DateTime(2015, 1, 26), DebitCredit.Credit,
                                                                              "R", "GBP", 18790.00M, "NTRF", "PON0000002534162", null, "Inward Payment", "GBG260150R2ETGXS");

            var transaction = new Transaction("1501260126CR18790.00NTRFPON0000002534162//GBG260150R2ETGXS\r\nInward Payment", new Currency("GBP"), Mt940Test.GbCultureInfo);

            ExpectedSwiftTransaction.AssertTransaction(expectedTransaction, transaction);
        }
 public static void AssertCustomerStatementTransactions(CustomerStatementMessage message,
                                                        List <ExpectedSwiftTransaction> expectedTransactions)
 {
     Assert.That(message.Transactions.Count, Is.EqualTo(expectedTransactions.Count), "Correct number of transactions.");
     for (var i = 0; i < expectedTransactions.Count(); i++)
     {
         var expected = expectedTransactions[i];
         var actual   = message.Transactions.ToList()[i];
         ExpectedSwiftTransaction.AssertTransaction(expected, actual);
     }
 }