protected async Task ReauthorizeAsync()
        {
            var newToken = await this.IntegrationAdminTokenRepository.GetTokenAsync(MagentoLogin.Create(this.ApiUser), MagentoPass.Create(this.ApiKey)).ConfigureAwait(false);

            var magentoUrl = MagentoUrl.Create(this.Store);

            this.ProductRepository          = new ProductRepository(newToken, magentoUrl);
            this.CatalogStockItemRepository = new CatalogStockItemRepository(newToken, magentoUrl);
            this.SalesOrderRepository       = new SalesOrderRepositoryV1(newToken, magentoUrl);
        }
예제 #2
0
        public static IEnumerable GetCliTestStoreCredentials()
        {
            string url      = TestContext.Parameters["url"];
            string login    = TestContext.Parameters["login"];
            string password = TestContext.Parameters["password"];

            if (!string.IsNullOrWhiteSpace(url) &&
                !string.IsNullOrWhiteSpace(login) &&
                !string.IsNullOrWhiteSpace(password))
            {
                return new TestCaseData[] { new TestCaseData(new RepositoryTestCase()
                    {
                        Url = MagentoUrl.Create(url), MagentoLogin = MagentoLogin.Create(login), MagentoPass = MagentoPass.Create(password)
                    }) }
            }
            ;

            return(null);
        }
    }