public async void RetrievesOwnerData() { KontomatikApi api = await LoginWithMockCredentials(); string owner = await api.GetOwnerDetailsXml(); Assert.Contains("<name>Jan Kowalski</name>", owner); }
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); } }