Пример #1
0
        private static void GetSellableItemsByParent_Page()
        {
            using (new SampleMethodScope())
            {
                var container = new AnonymousCustomerJeff(EnvironmentConstants.HabitatShops).Context.ShopsContainer();

                var result = Proxy.Execute(container.GetSellableItemsByParent("Entity-Category-Habitat_Master-FeaturedProducts", 0, 5));

                result.Should().NotBeNull();
                result.Should().HaveCount(5);
            }
        }
Пример #2
0
        private static void GetSellableItemsByParent_InvalidParent()
        {
            using (new SampleMethodScope())
            {
                var container = new AnonymousCustomerJeff(EnvironmentConstants.HabitatShops).Context.ShopsContainer();

                try
                {
                    var result = Proxy.Execute(container.GetSellableItemsByParent("InvalidParent", 0, 100));
                    ConsoleExtensions.WriteExpectedError();
                }
                catch (DataServiceQueryException ex)
                {
                    ex.Response.StatusCode.Should().Be((int)HttpStatusCode.NotFound);
                }
            }
        }