public EbayClient(IOptions <EbayConfig> ebayConfig, IContentfulService contentfulService, ICacheService cacheService, IBaseClient baseClient) : base(baseClient) { _ebayConfig = ebayConfig.Value; _contentfulService = contentfulService; _cacheService = cacheService; _baseClient = baseClient; }
public void EbayConfig_ConstructorCalledWithOutParameters_EndPointInitialized() { //------------ Arrange const string doesNotMetter = "does not metter"; //------------ Act var ebayConfig = new EbayConfig(doesNotMetter, doesNotMetter, doesNotMetter); //------------ Assert ebayConfig.EndPoint.Should().NotBeNullOrWhiteSpace("because constructor must initialize field from config"); }
public ProductsController( ICacheService cacheService, IEmailService emailService, IEtsyClient etsyClient, IEbayClient ebayClient, IOptions <EbayConfig> ebayConfig, IInstagramClient instagramClient, IContentfulService contentfulService) : base(contentfulService) { _cacheService = cacheService; _emailService = emailService; _etsyClient = etsyClient; _ebayClient = ebayClient; _ebayConfig = ebayConfig.Value; _instagramClient = instagramClient; }
public EbayServiceLowLevel(EbayUserCredentials credentials, EbayConfig ebayConfig, IWebRequestServices webRequestServices) { Condition.Requires(credentials, "credentials").IsNotNull(); Condition.Requires(webRequestServices, "webRequestServices").IsNotNull(); Condition.Requires(ebayConfig, "ebayDevCredentials").IsNotNull(); this._userCredentials = credentials; this._webRequestServices = webRequestServices; this._endPoint = ebayConfig.EndPoint; this._endPointBulkExhange = ebayConfig.EndPointBulkExhange; this._ebaySignInUrl = ebayConfig.SignInUrl; this._itemsPerPage = 200; this._ebayConfig = ebayConfig; }
public EbayFactory(EbayConfig config) { Condition.Requires(config, "config").IsNotNull(); this._config = config; }
public EbayServiceLowLevel(EbayUserCredentials userCredentials, EbayConfig ebayConfig) : this(userCredentials, ebayConfig, new WebRequestServices()) { }
/// <summary> /// Just for auth /// </summary> /// <param name="ebayConfig"></param> public EbayService(EbayConfig ebayConfig) : this(new EbayUserCredentials("empty", "empty"), ebayConfig, new WebRequestServices()) { }
public EbayService(EbayUserCredentials credentials, EbayConfig ebayConfig) : this(credentials, ebayConfig, new WebRequestServices()) { }
public EbayService(EbayUserCredentials credentials, EbayConfig ebayConfig, IWebRequestServices webRequestServices) { this.EbayServiceLowLevel = new EbayServiceLowLevel(credentials, ebayConfig, webRequestServices); DelayForMethod = new Dictionary <string, int>(); }