コード例 #1
0
 public TokenClient(
     HttpClient client,
     IApiAppVersion appVersion,
     ITokenStorage tokenStorage,
     string apiVersion,
     string locale) : base(appVersion, tokenStorage, apiVersion, locale)
 {
     _client = client;
 }
コード例 #2
0
ファイル: BaseApiClient.cs プロジェクト: time4vps/vpn-win-app
 public BaseApiClient(
     IApiAppVersion appVersion,
     ITokenStorage tokenStorage,
     string apiVersion,
     string locale)
 {
     _apiVersion  = apiVersion;
     TokenStorage = tokenStorage;
     _appVersion  = appVersion;
     _locale      = locale;
 }
コード例 #3
0
 public ApiClient(
     HttpClient client,
     HttpClient noCacheClient,
     ILogger logger,
     ITokenStorage tokenStorage,
     IApiAppVersion appVersion,
     string apiVersion,
     string locale) : base(logger, appVersion, tokenStorage, apiVersion, locale)
 {
     _client        = client;
     _noCacheClient = noCacheClient;
 }
コード例 #4
0
        public void TestInitialize()
        {
            _logger = Substitute.For <ILogger>();

            _appVersion = Substitute.For <IApiAppVersion>();
            _appVersion.Value().Returns(string.Empty);

            _tokenStorage = Substitute.For <ITokenStorage>();
            _tokenStorage.AccessToken.Returns(string.Empty);
            _tokenStorage.Uid.Returns(string.Empty);

            _httpClient             = _fakeHttpMessageHandler.ToHttpClient();
            _httpClient.BaseAddress = new Uri("http://127.0.0.1");

            _apiClient = new ApiClient(_httpClient, _httpClient, _logger, _tokenStorage, _appVersion, null, string.Empty);
        }