public async void RetrievesAccounts() { KontomatikApi api = await LoginWithMockCredentials(); string accounts = await api.GetAccountsXml(); Assert.Contains("<iban>PL05114020170000400213015148</iban>", accounts); }
private async Task runCommand(Dictionary <string, string> commandInfo, KontomatikApi api) { string Id = commandInfo["id"]; string apiResponse = ""; string commandName = GetCommandName(Id); try { switch (commandName) { case "ImportOwnerDetails": apiResponse = await api.GetOwnerDetailsXml(); break; case "ImportAccounts": apiResponse = await api.GetAccountsXml(); break; case "ImportTransactions": apiResponse = await api.GetTransactionsXml(commandInfo["iban"], Convert.ToDateTime(commandInfo["since"])); break; case "FinHealthIndicator": apiResponse = await api.GetFinHealthIndicatorXml(); break; default: this.SendToClient(Id, "", "Unrecognized command: " + Id); break; } if (!String.IsNullOrEmpty(apiResponse)) { this.SendToClient(Id, apiResponse, null); } } catch (KontomatikException exception) { this.SendToClient(Id, "", exception.Message); } }