public void Attachment() { System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); DocuSignWeb.Recipient[] recipients = SendingTests.CreateOneSigner(); DocuSignWeb.Attachment attachment = new DocuSignWeb.Attachment(); attachment.Label = "Label1"; attachment.Data = enc.GetBytes("Data"); attachment.Type = "String"; _envelope = Envelope.CreateAndSendEnvelope(SendingTests.DefaultCredentials, recipients, SendingTests.LoadPicturePdf(recipients[0]), "SendForSignature unit test", "testing docusign signing services", null, new DocuSignWeb.Attachment[] { attachment }); Assert.IsNotNull(_envelope); DocuSignWeb.EnvelopeStatus status = _envelope.RetrieveFullStatus(); Assert.IsNotNull(status); Assert.IsNotNull(status.EnvelopeAttachment); Assert.IsTrue(status.EnvelopeAttachment.Length > 0); Assert.IsNotNull(status.EnvelopeAttachment[0].Data); Assert.AreEqual(enc.GetString(status.EnvelopeAttachment[0].Data), "Data"); }
public void Field() { DocuSignWeb.Recipient[] recipients = SendingTests.CreateOneSigner(); DocuSignWeb.CustomField[] fields = new DocuSignWeb.CustomField[1]; fields[0] = new DocuSignWeb.CustomField(); fields[0].Name = "Form ID"; fields[0].Required = "False"; fields[0].Show = "False"; fields[0].Value = "1234"; _envelope = Envelope.CreateAndSendEnvelope(SendingTests.DefaultCredentials, recipients, SendingTests.LoadPicturePdf(recipients[0]), "SendForSignature unit test", "testing docusign signing services", fields); Assert.IsNotNull(_envelope); DocuSignWeb.EnvelopeStatus status = _envelope.RetrieveFullStatus(); Assert.IsNotNull(status); Assert.AreEqual("1234", status.CustomFields[0].Value); }
public void FixtureSetup() { _recipients = SendingTests.CreateOneSigner(); _recipients[0].CaptiveInfo = new DocuSignWeb.RecipientCaptiveInfo(); _recipients[0].CaptiveInfo.ClientUserId = _captiveInfoClientId; _envelope = Envelope.CreateAndSendEnvelope(SendingTests.DefaultCredentials, _recipients, SendingTests.LoadPicturePdf(_recipients[0]), "SendForSignature unit test", "testing docusign signing services"); Assert.IsNotNull(_envelope); }
public void FixtureSetup() { DocuSignWeb.Recipient[] recipients = SendingTests.CreateOneSigner(); _envelope = Envelope.CreateAndSendEnvelope(SendingTests.DefaultCredentials, recipients, SendingTests.LoadPicturePdf(recipients[0]), "SendForSignature unit test", "testing docusign signing services"); Assert.IsNotNull(_envelope); }
public void RequestTokenRequestRecipientToken() { _recipients = SendingTests.CreateOneSigner(); _recipients[0].CaptiveInfo = new DocuSignWeb.RecipientCaptiveInfo(); _recipients[0].CaptiveInfo.ClientUserId = _captiveInfoClientId; _envelope = Envelope.CreateAndSendEnvelope(SendingTests.DefaultCredentials, _recipients, SendingTests.LoadPicturePdf(_recipients[0]), "SendForSignature unit test", "testing docusign signing services"); Assert.IsNotNull(_envelope); string token = _envelope.RequestRecipientToken( _recipients[0], CreateAssertion(), Envelope.StandardUrls(new System.Uri("https://somebase.dsx.test/callback.aspx", UriKind.Absolute), "Mike B")); Assert.IsNotEmpty(token); Console.Out.WriteLine("The token is: " + token); }