public void Integration_VimeoClient_UploadEntireFile_UploadsFile() { // arrange long length; IUploadRequest completedRequest; using (var file = new BinaryContent(GetFullPath(TESTFILEPATH))) { length = file.Data.Length; VimeoClient client = CreateAuthenticatedClient(); // act completedRequest = client.UploadEntireFile(file); Debug.Assert(completedRequest.ClipId != null, "completedRequest.ClipId != null"); client.DeleteVideo(completedRequest.ClipId.Value); } // assert completedRequest.ShouldNotBeNull(); completedRequest.AllBytesWritten.ShouldBeTrue(); completedRequest.IsVerifiedComplete.ShouldBeTrue(); completedRequest.BytesWritten.ShouldEqual(length); completedRequest.ClipUri.ShouldNotBeNull(); completedRequest.ClipId.ShouldBeGreaterThan(0); }
public void Integration_VimeoClient_DeleteVideo_DeletesVideo() { // arrange long length; IUploadRequest completedRequest; using (var file = new BinaryContent(GetFullPath(TESTFILEPATH))) { length = file.Data.Length; VimeoClient client = CreateAuthenticatedClient(); // act completedRequest = client.UploadEntireFile(file); Assert.IsTrue(completedRequest.AllBytesWritten); Assert.IsNotNull(completedRequest); Assert.IsTrue(completedRequest.IsVerifiedComplete); Assert.AreEqual(length, completedRequest.BytesWritten); Assert.IsNotNull(completedRequest.ClipUri); Assert.IsTrue(completedRequest.ClipId.HasValue); client.DeleteVideo(completedRequest.ClipId.Value); Assert.IsNull(client.GetVideo(completedRequest.ClipId.Value)); } // assert }
public IUploadRequest Integration_VimeoClient_UploadEntireFile_UploadsFile(string filePath) { // arrange long length; IUploadRequest completedRequest; using (var file = new BinaryContent(GetFullPath(filePath))) { length = file.Data.Length; VimeoClient client = CreateAuthenticatedClient(); // act completedRequest = client.UploadEntireFile(file); } // assert Assert.IsNotNull(completedRequest); Assert.IsTrue(completedRequest.AllBytesWritten); Assert.IsTrue(completedRequest.IsVerifiedComplete); Assert.AreEqual(length, completedRequest.BytesWritten); Assert.IsNotNull(completedRequest.ClipUri); Assert.IsTrue(completedRequest.ClipId > 0); return(completedRequest); }