public KavenegarService(IHttpRestClient httpClient)
 => _httpClient = httpClient
Ejemplo n.º 2
0
        public async Task Request_is_correct([Frozen] IHttpRestClient client, IHubSpotContactClient sut, long primaryContactId, long secondaryContactId)
        {
            await sut.MergeAsync(primaryContactId, secondaryContactId);

            Mock.Get(client).Verify(p => p.SendAsync <object>(HttpMethod.Post, $"/contacts/v1/contact/merge-vids/{primaryContactId}/", It.IsAny <object>(), null));
        }
Ejemplo n.º 3
0
 public HttpHubSpotClient(IHttpRestClient client, ILogger <HttpHubSpotClient> logger)
 {
     _client = client ?? throw new ArgumentNullException(nameof(client));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Ejemplo n.º 4
0
        public async Task Request_is_correct([Frozen] IHttpRestClient client, IHubSpotContactClient sut)
        {
            var response = await sut.GetAllAsync();

            Mock.Get(client).Verify(p => p.SendAsync <ContactList>(HttpMethod.Get, "/contacts/v1/lists/all/contacts/all", It.IsAny <IQueryString>()));
        }
Ejemplo n.º 5
0
 public AuthController(IHttpRestClient restClient, IMemoryCache cache, IOptions <ToutiaoSetting> setting)
 {
     _restClient = restClient;
     _setting    = setting.Value;
     _cache      = cache;
 }
Ejemplo n.º 6
0
 public CreativesController(IHttpRestClient restClient, IMemoryCache cache)
 {
     _restClient = restClient;
     _cache      = cache;
 }