コード例 #1
0
ファイル: CtctUnitTest.cs プロジェクト: kstatz12/.net-sdk
        public void LiveUpdateContactListTest()
        {
            var cc = new ConstantContact(ApiKey, AccessToken);

            var contactList = new ContactList
                {
                Name = string.Format("List {0}", Guid.NewGuid()),
                Status = Status.Active
            };

            var result = cc.AddList(contactList);

            Assert.IsNotNull(result);
            Assert.IsTrue(result.Name.Equals(contactList.Name));

            result.Name = string.Format("List - {0}", Guid.NewGuid());

            var updatedList = cc.UpdateList(result);
            Assert.IsNotNull(updatedList);
            Assert.AreEqual(result.Id, updatedList.Id);
            Assert.AreEqual(result.Name, updatedList.Name);
        }