Example #1
0
        public void TestGetBankDebits_Fail()
        {
            var credentials = new Dictionary <string, string> {
                { "username", "YURIYK81" }, { "password", "2w3e4r5t" }
            };
            var calApi    = new Providers.Cards.Cal.CalApi(credentials);
            var exception = Assert.Throws <Exception>(() =>
                                                      calApi.GetBankDebits("0052748202617", "01981802", DateTime.Now.AddMonths(-1), DateTime.Now));

            calApi.Dispose();

            Assert.NotNull(exception);
            Assert.StartsWith("Did not succeed to fetch debits for card 01981802", exception.Message, StringComparison.CurrentCultureIgnoreCase);
        }
Example #2
0
        public void TestGetBankDebits_Success()
        {
            InitializeMapper();

            var credentials = new Dictionary <string, string> {
                { "username", "YURIYK81" }, { "password", "2w3e4r5t" }
            };
            var calApi = new Providers.Cards.Cal.CalApi(credentials);
            var debits = calApi.GetBankDebits("00527482012617", "01981802", DateTime.Now.AddMonths(-1), DateTime.Now);

            calApi.Dispose();

            Assert.True(debits.Any());
        }