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); } }
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()); } }
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()); } }
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); } }