示例#1
0
        public void PublicContractSendTest()
        {
            using (IRSignAPI sut = new RSignAPI(GetCredentials()))
            {
                var sendFilePath = sut.Send(@"C:\Users\Lorcan\Documents\Rmail\Contacts.pdf", "Contacts.pdf", "Template_Test", "*****@*****.**", "Lorcan Quinn", "SendFilepath Test 10-06", "This is a test for sending file path");
                Assert.IsNotNull(sendFilePath);

                var documentByte     = File.ReadAllBytes(@"C:\Users\Lorcan\Documents\Rmail\Contacts.pdf"); // NOTE: Assuming that we already will have the byte array of the document
                var sendByteDocument = sut.Send(documentByte, "Contacts.pdf", "Template_Test", "*****@*****.**", "Lorcan Quinn", "SendFilepath Test 10-06", "This is a test for sending file path");
                Assert.IsNotNull(sendByteDocument);

                var getEnvelopeStatus = sut.GetEnvelopeStatus("23395529-2607-AADE-9697-DDEB");
                Assert.IsNotNull(getEnvelopeStatus);

                var downloadSignedContract = sut.DownloadSignedContract("23395529-2607-AADE-9697-DDEB");
                Assert.IsNotNull(downloadSignedContract);
            }
        }