예제 #1
0
        public void LiveDeleteContactTest()
        {
            var cc = new ConstantContact(ApiKey, AccessToken);

            var contact = new Contact();
            contact.EmailAddresses.Add(new EmailAddress { EmailAddr = String.Format("{0}@email.com", Guid.NewGuid()), ConfirmStatus = ConfirmStatus.NoConfirmationRequired, Status = Status.Active });
            contact.Lists.Add(new ContactList { Id = "1", Status = Status.Active });

            Contact nc = cc.AddContact(contact, false);
            Assert.IsNotNull(nc);
            Assert.IsNotNull(nc.Id);

            var result = cc.DeleteContact(nc);
            Assert.IsTrue(result);
        }