public CounterpartiesApiTest() { HttpClient httpClient = new HttpClient(); RevolutApiClient api = new RevolutApiClient(httpClient, Config.ENDPOINT, Config.TOKEN); _counterpartiesApiClient = new CounterPartiesApiClient(api); }
public AccountApiTest() { var httpClient = new HttpClient(); RevolutApiClient api = new RevolutApiClient(httpClient, Config.ENDPOINT, Config.TOKEN); _accountClient = new AccountApiClient(api); }
public AccountApiTest() { tokenManager = new TokenManager($"{Environment.CurrentDirectory}\\Certificats\\token.json"); memoryCache = new MemoryCacheFactory().CreateInstance(token = tokenManager.LoadToken()); var config = new ConfigTest(); var httpClient = new HttpClient(); var api = new RevolutApiClient(config, token.AccessToken, httpClient, memoryCache); _accountClient = new AccountApiClient(api); }
public TokenFactoryTest() { tokenManager = new TokenManager($"{Environment.CurrentDirectory}\\Certificats\\token.json"); token = tokenManager.LoadToken(); memoryCache = new MemoryCacheFactory().CreateInstance(token); var config = new ConfigTest(); var httpClient = new HttpClient(); var api = new RevolutApiClient(config, httpClient); tokenFactory = new TokenFactory(new AuthorizationApiClient(api, config), memoryCache); }
public PaymentApiTest() { var httpClient = new HttpClient(); RevolutApiClient api = new RevolutApiClient(httpClient, Config.ENDPOINT, Config.TOKEN); _paymentClient = new PaymentApiClient(api); var httpClient2 = new HttpClient(); RevolutApiClient api2 = new RevolutApiClient(httpClient2, Config.ENDPOINT, Config.TOKEN); _counterpartyApiClient = new CounterPartiesApiClient(api2); RevolutApiClient api3 = new RevolutApiClient(Config.ENDPOINT, Config.TOKEN); _accountApiClient = new AccountApiClient(api3); }