public PokeAPIClient(string baseURL, IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory) { BaseURL = baseURL; RestClientFactory = restClientFactory; RestRequestFactory = restRequestFactory; Limiter = InitializeLimiter(); }
public LaunchpadRepository(IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory, IJsonResponseDeserializer deserializer, ILogger <BaseRepository> logger) : base(logger) { _restClientFactory = restClientFactory; _restRequestFactory = restRequestFactory; _deserializer = deserializer; _baseUrl = Environment.GetEnvironmentVariable("SPACEX_API_BASE_URL"); }
public JobProfileApi(IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory, AppSettings appSettings, APISettings apiSettings) { this.restClientFactory = restClientFactory; this.restRequestFactory = restRequestFactory; this.appSettings = appSettings; this.apiSettings = apiSettings; }
public WeatherAPI(IErrorLogger errorLogger, IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory) { _errorLogger = errorLogger; _restRequestFactory = restRequestFactory; _restClientFactory = restClientFactory; }
/// <summary>Start a new RestSession</summary> /// <param name="endPoint">the URL of the end point, i.e. base URL. Can be null if set separately</param> /// <param name="context">the session context</param> /// <param name="requestFactory">the factory creating RestRequest objects</param> public RestSession(string endPoint, SessionContext context, IRestRequestFactory requestFactory) { EndPoint = endPoint != null ? new Uri(endPoint) : null; Context = context; Request = null; Response = null; RequestHeadersToAdd = new NameValueCollection(); _requestFactory = requestFactory; }
public JsonEndpointTests() { this._restClientFactory = new RestClientFactory(); this._restRequestFactory = new RestRequestFactory(); _id = 1; _baseEndpoint = "https://jsonplaceholder.typicode.com/"; }
public RestClientProxy( IRestRequestFactory restRequestFactory, IRestClient restClient, ILogger <RestClientProxy> logger) { _restRequestFactory = restRequestFactory; _restClient = restClient; _logger = logger; }
public GooglePlacesAPI( IErrorLogger errorLogger, IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory) { _errorLogger = errorLogger; _restRequestFactory = restRequestFactory; _restClientFactory = restClientFactory; }
public TwitterApiService( IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory, TwitterAccessTokenProvider accessTokenProvider) { this.restClientFactory = restClientFactory; this.restRequestFactory = restRequestFactory; this.accessTokenProvider = accessTokenProvider; }
public void Setup() { this.appSettings = new AppSettings(); this.restClientFactory = A.Fake <IRestClientFactory>(); this.restRequestFactory = A.Fake <IRestRequestFactory>(); this.restClient = A.Fake <IRestClient>(); this.restRequest = A.Fake <IRestRequest>(); A.CallTo(() => this.restClientFactory.Create(A <Uri> .Ignored)).Returns(this.restClient); A.CallTo(() => this.restRequestFactory.Create(A <string> .Ignored)).Returns(this.restRequest); this.jobProfileOverviewAPI = new JobProfileOverviewAPI(this.restClientFactory, this.restRequestFactory, this.appSettings); }
public MeetupProvider( IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory, ISecureCredentialsProvider apiKeyProvider) { this.restClientFactory = restClientFactory; this.restRequestFactory = restRequestFactory; this.apiKeyProvider = apiKeyProvider; }
public RestService(IRestClient restClient, IRestRequestFactory requestFactory) { this.restClient = restClient; this.requestFactory = requestFactory; }
public RestaurantService(IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory) { this.restClientFactory = restClientFactory; this.restRequestFactory = restRequestFactory; }
public JiraApiRequestFactory(IRestRequestFactory restRequestFactory) { this.restRequestFactory = restRequestFactory; this.username = ""; this.password = ""; }
public RestClientService(IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory) { _restClientFactory = restClientFactory; _restRequestFactory = restRequestFactory; }
public AdRequestor(IRestClient restClient, IRestRequestFactory requestFactory) : base(restClient, requestFactory) { }
public CareerPathAPI(IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory, AppSettings appSettings) { this.restClientFactory = restClientFactory; this.restRequestFactory = restRequestFactory; this.appSettings = appSettings; }
public RestApiHelper(IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory) { this.RestClientFactory = restClientFactory; this.RestRequestFactory = restRequestFactory; }
public PostcodeService(IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory) { this.restClientFactory = restClientFactory; this.restRequestFactory = restRequestFactory; }
public RelatedCareersAPI(IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory, AppSettings appSettings) { this.restClientFactory = restClientFactory; this.restRequestFactory = restRequestFactory; this.appSettings = appSettings; }
//Since https://github.com/restsharp/RestSharp/commit/2781d7e11544a67c9bfb300edc43a0947ab7986f, RestSharp.RestRequest.AddFile() //has started reading the given file using IO. Therefore creating the RestRequest and calling AddFile in the same factory prevents //unit testing without having the actual files in the IO. internal RestFileRequestFactory(IRestRequestFactory restRequestFactory) { this.restRequestFactory = restRequestFactory; }
public JiraApiRequestFactory(IRestRequestFactory restRequestFactory) { this.restRequestFactory = restRequestFactory; }
public RegisterAPITest() { clientFactory = new RestClientFactory(); requestFactory = new RestRequestFactory(); createRestCall = new CreateRestCall(clientFactory, requestFactory); }
protected override RestFileRequestFactory CreateSut() { restRequestFactory = Mock <IRestRequestFactory>(); return(new RestFileRequestFactory(restRequestFactory)); }
public JobProfileOverviewAPI(IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory, AppSettings appSettings) { this.restClientFactory = restClientFactory; this.restRequestFactory = restRequestFactory; this.appSettings = appSettings; }
public CreateRestCall(IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory) { this.restClientFactory = restClientFactory; this.restRequestFactory = restRequestFactory; }
public MathWebClient(IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory) { _baseUrl = "http://localhost:55417/"; _restClientFactory = restClientFactory; _restRequestFactory = restRequestFactory; }
//Dependency Injection - Type is - Constructor Injection #region Constructor Injection public ConsumeService(IRestClientFactory restClientFactory, IRestRequestFactory restRequestFactory) { this.restClientFactory = restClientFactory; this.restRequestFactory = restRequestFactory; }