Пример #1
0
        public void GalleriesEditPhotosTest()
        {
            string galleryId = "78188-72157622589312064";

            var gallery = AuthInstance.GalleriesGetInfo(galleryId);

            Console.WriteLine("GalleryUrl = " + gallery.GalleryUrl);

            var photos = AuthInstance.GalleriesGetPhotos(galleryId);

            List <string> photoIds = new List <string>();

            foreach (var photo in photos)
            {
                photoIds.Add(photo.PhotoId);
            }

            AuthInstance.GalleriesEditPhotos(galleryId, gallery.PrimaryPhotoId, photoIds);

            var photos2 = AuthInstance.GalleriesGetPhotos(gallery.GalleryId);

            Assert.AreEqual(photos.Count, photos2.Count);

            for (int i = 0; i < photos.Count; i++)
            {
                Assert.AreEqual(photos[i].PhotoId, photos2[i].PhotoId);
            }
        }
Пример #2
0
        public void GalleriesEditMetaTest()
        {
            string galleryId = "78188-72157622589312064";

            string title       = "Great Entrances to Hell";
            string description = "A guide to what makes a great photo for the Entrances to Hell group: " +
                                 "<a href=\"https://www.flickr.com/groups/entrancetohell\">www.flickr.com/groups/entrancetohell</a>\n\n";

            description += DateTime.Now.ToString();

            AuthInstance.GalleriesEditMeta(galleryId, title, description);

            Gallery gallery = AuthInstance.GalleriesGetInfo(galleryId);

            Assert.AreEqual(title, gallery.Title);
            Assert.AreEqual(description, gallery.Description);
        }