コード例 #1
0
        public void AlphaPaymentReader_WhenGivenGarbage_ThrowsBadFileFormatException()
        {
            var provider = new FakePaymentRecordProvider("this is not a valid file");
            var reader = new AlphaPaymentReader(provider);

            reader.ProcessAllRecords();
        }
コード例 #2
0
        public void AlphaPaymentReader_WhenGivenExampleFile_CreatesAValidBundle()
        {
            using (var provider = new FileRawPaymentRecordProvider(@"Examplefiles\example_alphapayment.txt"))
            {
                var reader = new AlphaPaymentReader(provider);

                var result = reader.ProcessAllRecords();

                Assert.AreEqual(1, result.Count, "nr of payment bundles");
                Assert.AreEqual(4, result.First().Payments.Count, "nr of payments");
            }
        }