DeleteArchive() публичный Метод

public DeleteArchive ( string archiveId ) : void
archiveId string
Результат void
Пример #1
0
 /**
  * Deletes the OpenTok archive.
  * <p>
  * You can only delete an archive which has a status of "available" or "uploaded". Deleting
  * an archive removes its record from the list of archives. For an "available" archive, it
  * also removes the archive file, making it unavailable for download.
  */
 public void Delete()
 {
     if (opentok != null)
     {
         opentok.DeleteArchive(Id.ToString());
     }
 }
Пример #2
0
        public void DeleteArchiveTest()
        {
            string archiveId = "30b3ebf1-ba36-4f5b-8def-6f70d9986fe9";

            var mockClient = new Mock<HttpClient>();
            mockClient.Setup(httpClient => httpClient.Delete(It.IsAny<string>(),
                It.IsAny<Dictionary<string, string>>(),
                It.IsAny<Dictionary<string, object>>()));

            OpenTok opentok = new OpenTok(apiKey, apiSecret);
            opentok.Client = mockClient.Object;
            opentok.DeleteArchive(archiveId);

            mockClient.Verify(httpClient => httpClient.Delete(It.Is<string>(
                url => url.Equals("v2/partner/" + apiKey + "/archive/" + archiveId)),
                It.IsAny<Dictionary<string, string>>(),
                It.IsAny<Dictionary<string, object>>()), Times.Once());
        }