Author: fmantek
Date: Mon Oct 15 05:11:59 2007
New Revision: 296
Modified:
trunk/clients/cs/src/extensions/extensionbase.cs
trunk/clients/cs/src/gdocuments/documententry.cs
trunk/clients/cs/src/unittests/caltest.cs
trunk/clients/cs/src/unittests/photostest.cs
Log:
Fixed ExtensionBase to not save NULL attributes as empty
strings. This could cause Picasa updates to fail
Modified: trunk/clients/cs/src/extensions/extensionbase.cs
==============================================================================
--- trunk/clients/cs/src/extensions/extensionbase.cs (original)
+++ trunk/clients/cs/src/extensions/extensionbase.cs Mon Oct 15
05:11:59 2007
@@ -196,9 +196,12 @@
{
for (int i=0; i < this.getAttributes().Count; i++)
{
- string name = this.getAttributes().GetKey(i) as string;
- string value =
Utilities.ConvertToXSDString(this.getAttributes().GetByIndex(i));
- writer.WriteAttributeString(name, value);
+ if (this.getAttributes().GetByIndex(i) != null)
+ {
+ string name = this.getAttributes().GetKey(i)
as string;
+ string value =
Utilities.ConvertToXSDString(this.getAttributes().GetByIndex(i));
+ writer.WriteAttributeString(name, value);
+ }
}
}
SaveInnerXml(writer);
Modified: trunk/clients/cs/src/gdocuments/documententry.cs
==============================================================================
--- trunk/clients/cs/src/gdocuments/documententry.cs (original)
+++ trunk/clients/cs/src/gdocuments/documententry.cs Mon Oct 15
05:11:59 2007
@@ -36,6 +36,7 @@
public class DocumentEntry : AbstractEntry
{
+ static string PRESENTATION_KIND =
"http://schemas.google.com/docs/2007#presentation";
/// <summary>
/// Constructs a new EventEntry instance with the appropriate category
Modified: trunk/clients/cs/src/unittests/caltest.cs
==============================================================================
--- trunk/clients/cs/src/unittests/caltest.cs (original)
+++ trunk/clients/cs/src/unittests/caltest.cs Mon Oct 15 05:11:59 2007
@@ -1201,12 +1201,11 @@
Assert.IsNotNull(createdCalendar, "created calendar
should be returned.");
Assert.AreEqual(newCalendar.Title.Text,
createdCalendar.Title.Text, "Titles should be equal");
- //There is currently a bug where Calendar doesn't
return the summary in its created response
- //Assert.AreEqual(newCalendar.Summary.Text,
createdCalendar.Summary.Text, "Summaries should be equal");
- //Assert.AreEqual(newCalendar.TimeZone,
createdCalendar.TimeZone, "Timezone should be equal");
+ Assert.AreEqual(newCalendar.Summary.Text,
createdCalendar.Summary.Text, "Summaries should be equal");
+ Assert.AreEqual(newCalendar.TimeZone,
createdCalendar.TimeZone, "Timezone should be equal");
Assert.AreEqual(newCalendar.Hidden,
createdCalendar.Hidden, "Hidden property should be equal");
Assert.AreEqual(newCalendar.Color,
createdCalendar.Color, "Color property should be equal");
- //Assert.AreEqual(newCalendar.Location.ValueString,
createdCalendar.Location.ValueString, "Where should be equal");
+ Assert.AreEqual(newCalendar.Location.ValueString,
createdCalendar.Location.ValueString, "Where should be equal");
createdCalendar.Title.Text = "renamed calendar" +
Guid.NewGuid().ToString();
CalendarEntry updatedCalendar = (CalendarEntry)
createdCalendar.Update();
Modified: trunk/clients/cs/src/unittests/photostest.cs
==============================================================================
--- trunk/clients/cs/src/unittests/photostest.cs (original)
+++ trunk/clients/cs/src/unittests/photostest.cs Mon Oct 15 05:11:59 2007
@@ -233,8 +233,11 @@
Uri postUri = new Uri(album.FeedUri.ToString());
FileStream fs = File.OpenRead("testnet.jpg");
PicasaEntry entry = service.Insert(postUri,
fs, "image/jpeg", "testnet.jpg") as PicasaEntry;
-
Assert.IsTrue(entry.IsPhoto, "the new entry should
be a photo entry");
+
+ entry.Title.Text = "This is a new Title";
+ entry.Summary.Text = "A lovely shot in the shade";
+ PicasaEntry updatedEntry = entry.Update() as PicasaEntry;
}
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Data API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---