-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathCheckTheStatusOfTheDocument.cs
More file actions
31 lines (27 loc) · 1.02 KB
/
CheckTheStatusOfTheDocument.cs
File metadata and controls
31 lines (27 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System.IO;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SignNow.Net.Model;
namespace SignNow.Net.Examples
{
public partial class DocumentExamples
{
[TestMethod]
public async Task CheckTheStatusOfTheDocumentAsync()
{
// upload a document with a signature field
await using var fileStream = File.OpenRead(PdfWithSignatureField);
var document = await testContext.Documents
.UploadDocumentWithFieldExtractAsync(fileStream, "CheckTheStatusOfTheDocument.pdf")
.ConfigureAwait(false);
// get the document
var documentStatus = await testContext.Documents
.GetDocumentAsync(document?.Id)
.ConfigureAwait(false);
// check the status of the document
Assert.AreEqual(DocumentStatus.NoInvite, documentStatus.Status);
// delete the test document
DeleteTestDocument(document?.Id);
}
}
}