public OfferingSaleCanceller(IOfferingSaleCancellerConfiguration configuration, ISerializer serializer, IDeserializer deserializer, IHttpClientCreator httpClientCreator, IAuthTokenGenerator authTokenGenerator) { _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); _serializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); _deserializer = deserializer ?? throw new ArgumentNullException(nameof(deserializer)); _httpClientCreator = httpClientCreator ?? throw new ArgumentNullException(nameof(httpClientCreator)); _authTokenGenerator = authTokenGenerator ?? throw new ArgumentNullException(nameof(authTokenGenerator)); }
public void When_HttpClientCreator_Is_Null_Then_Constructor_Throws_ArgumentNullException() { // set up IHttpClientCreator httpClientCreator = null; // execute var ex = Assert.Throws <ArgumentNullException>(() => new OfferingResultWriter(_configuration.Object, _serializer.Object, _deserializer.Object, httpClientCreator, _authTokenGenerator.Object, _vendorCredentials.Object)); // verify Assert.Equal("httpClientCreator", ex.ParamName); }
internal RestClientScalar(IHttpClientCreator httpClientCreator, string path) : base(httpClientCreator, path) { }
internal RestClientCollection(IHttpClientCreator httpClientCreator, string path) : base(httpClientCreator, path) { }
public OfferingSaleCanceller(IOfferingSaleCancellerConfiguration configuration, ISerializer serializer, IDeserializer deserializer, IHttpClientCreator httpClientCreator, IAuthTokenGenerator authTokenGenerator, IVendorCredentials defaultCredentials) : this(configuration, serializer, deserializer, httpClientCreator, authTokenGenerator) { _defaultCredentials = defaultCredentials; }
public RestClient(Uri baseUrl, IHttpClientCreator httpClientCreator) { _baseUrl = baseUrl; _httpClientCreator = httpClientCreator; }
internal RestClientResourceBase(IHttpClientCreator httpClientCreator, string path) { HttpClientCreator = httpClientCreator; Path = path; Serializer = new JsonContentSerializer(); }