Example #1
0
 public EbayClient(IOptions <EbayConfig> ebayConfig, IContentfulService contentfulService, ICacheService cacheService, IBaseClient baseClient) : base(baseClient)
 {
     _ebayConfig        = ebayConfig.Value;
     _contentfulService = contentfulService;
     _cacheService      = cacheService;
     _baseClient        = baseClient;
 }
Example #2
0
        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");
        }
Example #3
0
 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;
 }
Example #4
0
        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;
        }
Example #5
0
 public EbayFactory(EbayConfig config)
 {
     Condition.Requires(config, "config").IsNotNull();
     this._config = config;
 }
Example #6
0
 public EbayServiceLowLevel(EbayUserCredentials userCredentials, EbayConfig ebayConfig)
     : this(userCredentials, ebayConfig, new WebRequestServices())
 {
 }
Example #7
0
 /// <summary>
 /// Just for auth
 /// </summary>
 /// <param name="ebayConfig"></param>
 public EbayService(EbayConfig ebayConfig) : this(new EbayUserCredentials("empty", "empty"), ebayConfig, new WebRequestServices())
 {
 }
Example #8
0
 public EbayService(EbayUserCredentials credentials, EbayConfig ebayConfig) : this(credentials, ebayConfig, new WebRequestServices())
 {
 }
Example #9
0
        public EbayService(EbayUserCredentials credentials, EbayConfig ebayConfig, IWebRequestServices webRequestServices)
        {
            this.EbayServiceLowLevel = new EbayServiceLowLevel(credentials, ebayConfig, webRequestServices);

            DelayForMethod = new Dictionary <string, int>();
        }