Example #1
0
        public async Task SetupAsync()
        {
            Config = new TestConfiguration();
            ExchangeSetApiClient = new ExchangeSetApiClient(Config.EssBaseAddress);
            FssApiClient         = new FssApiClient();
            AuthTokenProvider authTokenProvider = new AuthTokenProvider();

            EssJwtToken = await authTokenProvider.GetEssToken();

            FssJwtToken = await authTokenProvider.GetFssToken();

            DataHelper   = new DataHelper();
            ScsApiClient = new SalesCatalogueApiClient(Config.ScsAuthConfig.BaseUrl);
            ScsJwtToken  = await authTokenProvider.GetScsToken();

            ProductVersionData = new List <ProductVersionModel>();
            ////Invalid Edition Number
            ProductVersionData.Add(DataHelper.GetProductVersionModelData("DE416040", 11, 1));
            ApiEssResponse = await ExchangeSetApiClient.GetProductVersionsAsync(ProductVersionData, accessToken : EssJwtToken);

            //Get the BatchId
            var batchId = await ApiEssResponse.GetBatchId();

            CleanUpBatchIdList.Add(batchId);
            DownloadedFolderPath = await FileContentHelper.CreateExchangeSetFile(ApiEssResponse, FssJwtToken);
        }
Example #2
0
        public async Task SetupAsync()
        {
            Config = new TestConfiguration();
            ExchangeSetApiClient   = new ExchangeSetApiClient(Config.EssBaseAddress);
            FssApiClient           = new FssApiClient();
            ProductIdentifierModel = new ProductIdentifierModel();
            DataHelper             = new DataHelper();
            AuthTokenProvider authTokenProvider = new AuthTokenProvider();

            EssJwtToken = await authTokenProvider.GetEssToken();

            FssJwtToken = await authTokenProvider.GetFssToken();
        }
Example #3
0
        public async Task SetupAsync()
        {
            Config = new TestConfiguration();
            ExchangeSetApiClient = new ExchangeSetApiClient(Config.EssBaseAddress);
            FssApiClient         = new FssApiClient();
            AuthTokenProvider authTokenProvider = new AuthTokenProvider();

            EssJwtToken = await authTokenProvider.GetEssToken();

            EssJwtTokenNoRole = await authTokenProvider.GetEssTokenNoAuth();

            EssJwtCustomizedToken = authTokenProvider.GenerateCustomToken();
            FssJwtToken           = await authTokenProvider.GetFssToken();
        }
Example #4
0
        public async Task SetupAsync()
        {
            Config = new TestConfiguration();
            ExchangeSetApiClient = new ExchangeSetApiClient(Config.EssBaseAddress);
            FssApiClient         = new FssApiClient();
            AuthTokenProvider authTokenProvider = new AuthTokenProvider();

            EssJwtToken = await authTokenProvider.GetEssToken();

            FssJwtToken = await authTokenProvider.GetFssToken();

            DataHelper   = new DataHelper();
            ScsApiClient = new SalesCatalogueApiClient(Config.ScsAuthConfig.BaseUrl);
            ScsJwtToken  = await authTokenProvider.GetScsToken();
        }
Example #5
0
        public async Task SetupAsync()
        {
            Config = new TestConfiguration();
            ExchangeSetApiClient = new ExchangeSetApiClient(Config.EssBaseAddress);
            FssApiClient         = new FssApiClient();
            AuthTokenProvider authTokenProvider = new AuthTokenProvider();

            EssJwtToken = await authTokenProvider.GetEssToken();

            FssJwtToken = await authTokenProvider.GetFssToken();

            DataHelper = new DataHelper();

            var ApiEssResponse = await ExchangeSetApiClient.GetProductIdentifiersDataAsync(new List <string>() { "DE260001" }, accessToken : EssJwtToken);

            Assert.AreEqual(200, (int)ApiEssResponse.StatusCode, $"Incorrect status code is returned {ApiEssResponse.StatusCode}, instead of the expected status 200.");
        }
Example #6
0
        public async Task SetupAsync()
        {
            Config = new TestConfiguration();
            ExchangeSetApiClient = new ExchangeSetApiClient(Config.EssBaseAddress);
            FssApiClient         = new FssApiClient();
            AuthTokenProvider authTokenProvider = new AuthTokenProvider();

            EssJwtToken = await authTokenProvider.GetEssToken();

            FssJwtToken = await authTokenProvider.GetFssToken();

            DataHelper   = new DataHelper();
            ScsApiClient = new SalesCatalogueApiClient(Config.ScsAuthConfig.BaseUrl);
            ScsJwtToken  = await authTokenProvider.GetScsToken();

            ApiEssResponse = await ExchangeSetApiClient.GetProductIdentifiersDataAsync(DataHelper.GetProductIdentifiers(), accessToken : EssJwtToken);

            //Get the BatchId
            var batchId = await ApiEssResponse.GetBatchId();

            CleanUpBatchIdList.Add(batchId);
            DownloadedFolderPath = await FileContentHelper.CreateExchangeSetFile(ApiEssResponse, FssJwtToken);
        }