Esempio n. 1
0
		public void LiveUpdateFolderTest()
		{
			var cc = new ConstantContact(ApiKey, AccessToken);

            var folder = new MyLibraryFolder();
			folder.Id = Guid.NewGuid().ToString();
			folder.Name = Guid.NewGuid().ToString();
			folder.CreatedDate = Extensions.ToISO8601String(DateTime.Now);
            folder.ModifiedDate = Extensions.ToISO8601String(DateTime.Now);

            var newFolder = cc.AddLibraryFolder(folder);
            Assert.IsNotNull(newFolder);
            Assert.IsNotNull(newFolder.Id);

			newFolder.Name = Guid.NewGuid().ToString();
            var updatedFolder = cc.UpdateLibraryFolder(newFolder);

            Assert.IsNotNull(updatedFolder);
            Assert.AreEqual(updatedFolder.Id, newFolder.Id);
            Assert.AreEqual(updatedFolder.Name, newFolder.Name);
		}