public void setPhotoExtensionTest() { PicasaEntry target = new PicasaEntry(); // TODO: Initialize to an appropriate value string extension = GPhotoNameTable.Photoid; string newValue = "theid"; SimpleElement actual; actual = target.SetPhotoExtensionValue(extension, newValue); Assert.IsTrue(actual is GPhotoPhotoId); Assert.AreEqual(newValue, actual.Value); }
public void getPhotoExtensionValueTest() { PicasaEntry target = new PicasaEntry(); // TODO: Initialize to an appropriate value string extension = GPhotoNameTable.Photoid; string newValue = "theid"; string actual = null; target.SetPhotoExtensionValue(extension, newValue); actual = target.GetPhotoExtensionValue(extension); Assert.AreEqual(newValue, actual); }
public void SetPhotoCreationDate(PicasaEntry photo, DateTime creationDate) { //PhotoAccessor ac = new PhotoAccessor(photo); var longTime = (creationDate.ToUniversalTime().Subtract(new DateTime(1970, 1, 1))).TotalMilliseconds; //ac.Timestamp = Convert.ToUInt64(longTime); //photo.Published = creationDate.ToUniversalTime(); photo.SetPhotoExtensionValue("timestamp", Convert.ToUInt64(longTime).ToString()); try { PicasaEntry updatedEntry = (PicasaEntry)photo.Update(); } catch { var service = GetPicasaService(true); photo.Service = service; PicasaEntry updatedEntry = (PicasaEntry)photo.Update(); } }