コード例 #1
0
        public void GetFlavor()
        {
            using (var httpTest = new HttpTest())
            {
                var cdnService = new ContentDeliveryNetworkService(Stubs.AuthenticationProvider, DefaultRegion);
                httpTest.RespondWithJson(new Flavor {Id = "flavor-id"});

                var flavor = cdnService.GetFlavor("flavor-id");

                Assert.NotNull(flavor);
                Assert.Equal("flavor-id", flavor.Id);
            }
        }
コード例 #2
0
        public void ListFlavors()
        {
            using (var httpTest = new HttpTest())
            {
                var cdnService = new ContentDeliveryNetworkService(Stubs.AuthenticationProvider, DefaultRegion);
                httpTest.RespondWithJson(new FlavorCollection(new[] { new Flavor() }));

                var flavors = cdnService.ListFlavors();

                Assert.NotNull(flavors);
                Assert.Equal(1, flavors.Count());
            }
        }
コード例 #3
0
        public void ListFlavors()
        {
            using (var httpTest = new HttpTest())
            {
                var cdnService = new ContentDeliveryNetworkService(Stubs.AuthenticationProvider, DefaultRegion);
                httpTest.RespondWithJson(new FlavorCollection(new[] {new Flavor()}));

                var flavors = cdnService.ListFlavors();

                Assert.NotNull(flavors);
                Assert.Equal(1, flavors.Count());
            }
        }
コード例 #4
0
        public void GetFlavor()
        {
            using (var httpTest = new HttpTest())
            {
                var cdnService = new ContentDeliveryNetworkService(Stubs.AuthenticationProvider, DefaultRegion);
                httpTest.RespondWithJson(new Flavor {
                    Id = "flavor-id"
                });

                var flavor = cdnService.GetFlavor("flavor-id");

                Assert.NotNull(flavor);
                Assert.Equal("flavor-id", flavor.Id);
            }
        }