コード例 #1
0
 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));
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 internal RestClientScalar(IHttpClientCreator httpClientCreator, string path)
     : base(httpClientCreator, path)
 {
 }
コード例 #4
0
 internal RestClientCollection(IHttpClientCreator httpClientCreator, string path)
     : base(httpClientCreator, path)
 {
 }
コード例 #5
0
 public OfferingSaleCanceller(IOfferingSaleCancellerConfiguration configuration, ISerializer serializer, IDeserializer deserializer, IHttpClientCreator httpClientCreator, IAuthTokenGenerator authTokenGenerator, IVendorCredentials defaultCredentials) : this(configuration, serializer, deserializer, httpClientCreator, authTokenGenerator)
 {
     _defaultCredentials = defaultCredentials;
 }
コード例 #6
0
 public RestClient(Uri baseUrl, IHttpClientCreator httpClientCreator)
 {
     _baseUrl           = baseUrl;
     _httpClientCreator = httpClientCreator;
 }
コード例 #7
0
 internal RestClientResourceBase(IHttpClientCreator httpClientCreator, string path)
 {
     HttpClientCreator = httpClientCreator;
     Path       = path;
     Serializer = new JsonContentSerializer();
 }