public void PhotosLicensesSetLicenseTest() { string photoId = "7176125763"; var photoInfo = AuthInstance.PhotosGetInfo(photoId); // Rainbow Rose var origLicense = photoInfo.License; var newLicense = origLicense == LicenseType.AttributionCC ? LicenseType.AttributionNoDerivativesCC : LicenseType.AttributionCC; AuthInstance.PhotosLicensesSetLicense(photoId, newLicense); var newPhotoInfo = IgnoreInstance.PhotosGetInfo(photoId); Assert.AreEqual(newLicense, newPhotoInfo.License, "License has not changed to correct value."); // Reset license AuthInstance.PhotosLicensesSetLicense(photoId, origLicense); }
public void PhotosAddTagsTest() { var testtag = new[] { "thisisatesttag" }; const string photoId = "6282363572"; // Add the tag AuthInstance.PhotosAddTags(photoId, testtag); // Add second tag using different signature AuthInstance.PhotosAddTags(photoId, new[] { testtag + "2" }); // Get list of tags var tags = IgnoreInstance.TagsGetListPhoto(photoId); // Find the tag in the collection var tagsToRemove = tags.Where(t => testtag.Contains(t.TagText)); foreach (var tag in tagsToRemove) { // Remove the tag AuthInstance.PhotosRemoveTag(tag.TagId); } }