Esempio n. 1
0
        public void Integration_VimeoClient_GetAccountAlbumVideo_RetrievesVideo()
        {
            // arrange
            VimeoClient client = CreateAuthenticatedClient();

            // act
            Video video = client.GetAlbumVideo(vimeoSettings.AlbumId, vimeoSettings.VideoId);

            // assert
            Assert.IsNotNull(video);
        }
Esempio n. 2
0
        public void Integration_VimeoClient_GetAccountAlbumVideo_RetrievesVideo()
        {
            // arrange
            const long  albumId = 2993579;   // Your album ID here
            const long  clipId  = 103374506; // Your video ID here
            VimeoClient client  = CreateAuthenticatedClient();

            // act
            Video video = client.GetAlbumVideo(albumId, clipId);

            // assert
            Assert.IsNotNull(video);
        }
        public void Integration_VimeoClient_AlbumVideoManagement()
        {
            VimeoClient client = CreateAuthenticatedClient();

            // assume this album and video are configured in the current account...
            long albumId = vimeoSettings.AlbumId;
            long videoId = vimeoSettings.VideoId;

            // add it...
            bool  isAdded    = client.AddToAlbum(albumId, videoId);
            Video addedVideo = client.GetAlbumVideo(albumId, videoId);
            bool  isPresent  = addedVideo != null;

            Assert.IsTrue(isAdded, "AddToAlbum failed.");
            Assert.IsTrue(isAdded == isPresent, "Returned value does not match actual presence of video.");

            // then remove it...
            bool  isRemoved    = client.RemoveFromAlbum(albumId, videoId);
            Video removedVideo = client.GetAlbumVideo(albumId, videoId);
            bool  isAbsent     = removedVideo == null;

            Assert.IsTrue(isRemoved, "RemoveFromAlbum failed.");
            Assert.IsTrue(isRemoved == isAbsent, "Returned value does not match actual abscence of video.");
        }