public void RetrieveImagesForPage_WhenProvidedWithAKnownPageAndRequesterIsAnon_ReturnsImages(WireDataFormat format) { var client = TestContext.CreateClientNoCredentials(format); var pageClient = new PageApi(client.HttpChannel); var pageData = pageClient.GetImages(new GetFundraisingPageImagesRequest() { PageShortName = "rasha25" }); Assert.That(pageData.Count, Is.GreaterThan(0)); }
public void DeleteImage_WhileSupportedValidCredentialsAndValidRequest_ReturnTrue(WireDataFormat format) { //arrange var client = TestContext.CreateClientValidCredentials(format); var fundraisingResources = new PageApi(client.HttpChannel); var validRegisterPageRequest = ValidRegisterPageRequest(); fundraisingResources.Create(validRegisterPageRequest); var validAddImageRequest = ValidAddFundraisingPageImageRequest(validRegisterPageRequest.PageShortName); fundraisingResources.AddImage(validAddImageRequest); var images = fundraisingResources.GetImages(new GetFundraisingPageImagesRequest { PageShortName = validRegisterPageRequest.PageShortName }); var image = images.First(); //act var result = fundraisingResources.DeleteImage(validRegisterPageRequest.PageShortName, image.Url); //assert Assert.IsTrue(result); }