Example #1
0
        public void VerifyResult()
        {
            ContactsExample example = new ContactsExample(Props.GetInstance());

            example.Run();

            DocumentPackage documentPackage = example.RetrievedPackage;
            Signer          signer          = documentPackage.Signers[example.email1];

            // Assert signer information is correct
            Assert.AreEqual(signer.Email, example.signerForPackage.Email);
            Assert.AreEqual(signer.FirstName, example.signerForPackage.FirstName);
            Assert.AreEqual(signer.LastName, example.signerForPackage.LastName);
            Assert.AreEqual(signer.Title, example.signerForPackage.Title);
            Assert.AreEqual(signer.Company, example.signerForPackage.Company);

            // Assert new signer is added to the contacts
            Assert.IsNotNull(example.afterContacts[example.email2]);
            Assert.AreEqual(example.afterContacts[example.email2].FirstName, "John");
            Assert.AreEqual(example.afterContacts[example.email2].LastName, "Smith");
        }
        public void VerifyResult()
        {
            ContactsExample example = new ContactsExample(Props.GetInstance());
            example.Run();

            DocumentPackage documentPackage = example.EslClient.GetPackage(example.PackageId);
            Signer signer = documentPackage.Signers[example.email1];

            // Assert signer information is correct
            Assert.AreEqual(signer.Email, example.signerForPackage.Email);
            Assert.AreEqual(signer.FirstName, example.signerForPackage.FirstName);
            Assert.AreEqual(signer.LastName, example.signerForPackage.LastName);
            Assert.AreEqual(signer.Title, example.signerForPackage.Title);
            Assert.AreEqual(signer.Company, example.signerForPackage.Company);

            // Assert new signer is added to the contacts
            Assert.AreEqual(example.afterContacts.Count, example.beforeContacts.Count + 1);
            Assert.IsNotNull(example.afterContacts[example.email2]);
            Assert.AreEqual(example.afterContacts[example.email2].FirstName, "John");
            Assert.AreEqual(example.afterContacts[example.email2].LastName, "Smith");
        }