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);
        }
Exemplo n.º 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 void StandardBankTransactionsGb()
        {
            var expectedTransactions = new List <ExpectedSwiftTransaction>();

            expectedTransactions.Add(ExpectedSwiftTransaction.CreateExpected(new DateTime(2015, 1, 26), DebitCredit.Debit,
                                                                             "R", "GBP", 52.58M, "NTRF", "ITM1234567890123", "yyyyyyyyyyyyyyyyy\r\nBasel\r\nCHF 50.00   0.950932 on 23/01/2015", "Visa"));

            expectedTransactions.Add(ExpectedSwiftTransaction.CreateExpected(new DateTime(2015, 1, 26), DebitCredit.Debit,
                                                                             "R", "GBP", 25.31M, "NTRF", "ITM1234567890123", "yyyyyyyyyyyyyyyyy\r\nAMZN.COM/BILL\r\non 23/01/2015", "Visa"));

            expectedTransactions.Add(ExpectedSwiftTransaction.CreateExpected(new DateTime(2015, 1, 26), DebitCredit.Credit,
                                                                             "R", "GBP", 18790M, "NTRF", "PON1234567890123", "yyyyyyyyyyyyyyyyy", "Inward Payment", "ABC12345678HRSXS"));

            var messageList =
                GetSample(StandardBankFormat, "Raptorious.SharpMt940Lib.Tests.Samples.StandardBank_few_transactions_GB.txt", CultureInfo.GetCultureInfo("en-GB")).ToList();

            var message = messageList[0];

            ExpectedSwiftMessage.AssertCustomerStatementTransactions(message, expectedTransactions);
        }