public async Task ItCanGetAPredefinedAccount() { var accounts = await GetPredefinedAccounts(); if (!accounts.Any()) { Assert.Inconclusive("No predefined accounts exist in the system"); } var request = new PredefinedAccountListRequest(connectionSettings.AccessToken, connectionSettings.ClientSecret); var response = await PredefinedAccountsService.GetPredefinedAccountAsync( request, accounts.First().Name ); Assert.IsNotNull(response); Assert.IsNotNull(response.Data); Assert.AreEqual(accounts.First().Name, response.Data.Name); }
private async Task <PredefinedAccount> GetPredefinedAccount(string accountName) { var request = new PredefinedAccountListRequest(connectionSettings.AccessToken, connectionSettings.ClientSecret); return((await PredefinedAccountsService.GetPredefinedAccountAsync(request, accountName)).Data); }