Пример #1
0
        public async Task InitializeAsync()
        {
            var policy = new LeakyBucketExecutionPolicy();

            Service.SetExecutionPolicy(policy);
            CollectService.SetExecutionPolicy(policy);
            ProductService.SetExecutionPolicy(policy);
            CustomCollectionService.SetExecutionPolicy(policy);

            // Create a custom collection to use with these tests.
            var collection = await CustomCollectionService.CreateAsync(new CustomCollection()
            {
                Title     = "Things",
                Published = false,
                BodyHtml  = "<h1>Hello from ShopifySharp</h1>",
                Image     = new CustomCollectionImage()
                {
                    Attachment = "R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="
                }
            });

            CollectionId = collection.Id.Value;

            // Create a collection to use with get, list, count, etc. tests.
            await Create();
        }
        public async Task InitializeAsync()
        {
            var policy = new LeakyBucketExecutionPolicy();

            Service.SetExecutionPolicy(policy);
            ProductService.SetExecutionPolicy(policy);
            CollectService.SetExecutionPolicy(policy);

            // Create one collection for use with count, list, get, etc. tests.
            await Create();
        }