public async Task add_multiple_attachment_to_existing_handle_then_delete_handle() { //Upload father var fatherHandle = new DocumentHandle("father"); await _documentStoreClient.UploadAsync(TestConfig.PathToDocumentPdf, fatherHandle); await UpdateAndWaitAsync().ConfigureAwait(false); //upload attachments await _documentStoreClient.UploadAttachmentAsync(TestConfig.PathToDocumentPng, fatherHandle, "Zip", Path.GetFileName(TestConfig.PathToDocumentPng)); await _documentStoreClient.UploadAttachmentAsync(TestConfig.PathToOpenDocumentText, fatherHandle, "Zip", Path.GetFileName(TestConfig.PathToOpenDocumentText)); await UpdateAndWaitAsync().ConfigureAwait(false); await _documentStoreClient.DeleteAsync(fatherHandle); await UpdateAndWaitAsync().ConfigureAwait(false); Assert.That(_documentDescriptorCollection.AsQueryable().Count(), Is.EqualTo(0), "Attachment should be deleted."); Assert.That(_documentCollection.AsQueryable().Count(), Is.EqualTo(0), "Attachment should be deleted."); }
public void Upload_pdf_copyHandle_then_delete() { _docs.UploadAsync(TestConfig.PathToDocumentPdf, DocumentHandle.FromString("docs_to_copy")).Wait(); _docs.CopyHandleAsync(DocumentHandle.FromString("docs_to_copy"), DocumentHandle.FromString("docs_to_copy_copied")).Wait(); _docs.DeleteAsync(DocumentHandle.FromString("docs_to_copy")).Wait(); }