public void Setup() { _configuration = new ConfigurationBuilder() .AddUserSecrets <JwtTokenGenerator>() .Build(); _apiConsumerConfig = new ApiConsumerConfig(_configuration); }
public void Setup() { _configuration = new ConfigurationBuilder() .AddJsonFile("appsettings.json", optional: false) .AddUserSecrets <ApiConsumerTests>() .Build(); _apiConsumerConfig = new ApiConsumerConfig(_configuration); _apiConsumer = new ApiConsumer(_apiConsumerConfig); }
public IActionResult Index() { var config = new ApiConsumerConfig("https://localhost:5001/api"); var apiConsumer = new ApiConsumer(config); var accounts = apiConsumer.GetAccounts(); var viewModel = new AccountViewModel { Accounts = AccountMapper.SDKToDomain(accounts) }; return(View(viewModel)); }
public ApiConsumer(ApiConsumerConfig config) { _config = config; _restConsumer = new RestConsumer(_config.BaseUrl); }