Beispiel #1
0
        private string GetTestShop()
        {
            var request  = ShopRequestHelper.GetAllShops();
            var response = this.restClient.Execute <List <ShopResponse> >(request);
            var testShop = response.Data.First(x => x.Id.StartsWith("shop_"));

            return(testShop.Id);
        }
Beispiel #2
0
        public void GetAllShops_When_ThereAreShops_Returns200()
        {
            var request  = ShopRequestHelper.GetAllShops();
            var response = this.restClient.Execute <List <ShopResponse> >(request);

            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
            Assert.NotNull(response.Data);
            Assert.True(response.Data.Count > 0);
        }
Beispiel #3
0
        private void DeactivateAllShops()
        {
            var request = ShopRequestHelper.GetAllShops();

            request.AddQueryParameter("isActive", "true");
            var response = this.restClient.Execute <List <ShopResponse> >(request);

            response.Data.ForEach(activeShop =>
            {
                var deactivateRequest = ShopRequestHelper.DeactivateShop(activeShop.Id);
                this.restClient.Execute(deactivateRequest);
            });
        }