public void TestGetBankDebit_Fail() { var credentials = new Dictionary <String, String> { { "ID", "311913289" }, { "Last 6 digits", "742989" }, { "Password", "w2e3r4t5" } }; var amexApi = new Providers.Cards.Amex.AmexApi(credentials); var exception = Assert.Throws <Exception>(() => amexApi.GetBankDebit("123449", "2489", DateTime.Now.AddMonths(-1).Year, DateTime.Now.AddMonths(-1).Month)); amexApi.Dispose(); Assert.NotNull(exception); }
public void TestGetBankDebit_Success() { var credentials = new Dictionary <String, String> { { "ID", "311913289" }, { "Last 6 digits", "742989" }, { "Password", "w2e3r4t5" } }; var amexApi = new Providers.Cards.Amex.AmexApi(credentials); var debits = amexApi.GetBankDebit("129249", "2989", DateTime.Now.AddMonths(-1).Year, DateTime.Now.AddMonths(-1).Month); amexApi.Dispose(); Assert.True(debits.All(c => c.CardNumber == "2989")); }