Пример #1
0
        private static async Task <PortfolioConfigModel> GetConfig(string portfolio)
        {
            var url      = ConfigurationManager.AppSettings["backendUrl"];
            var apiKey   = ConfigurationManager.AppSettings["backendApiKey"];
            var user     = ConfigurationManager.AppSettings["testAdminUser"];
            var password = ConfigurationManager.AppSettings["testAdminUserPassword"];

            BackendAPIClient backendClient = new BackendAPIClient(url, apiKey, user, password);

            return(await backendClient.GetAsync <PortfolioConfigModel>($"api/PortfolioConfiguration?portfolio={portfolio}"));
        }
Пример #2
0
 static TestBackendAPIClient()
 {
     client = new BackendAPIClient("http://localhost/FSAPortfolio.WebAPI/", TestSettings.APIKey, TestSettings.TestUser, TestSettings.TestUserPassword);
 }