Skip to content

Commit

Permalink
Merge pull request #699 from linquize/atom-bug-2-10
Browse files Browse the repository at this point in the history
Atom bug 2 10
  • Loading branch information
Alex Rønne Petersen committed Jul 23, 2013
2 parents 1609a11 + 372c612 commit b06fc16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ void WriteXml (XmlWriter writer, bool writeRoot)
}

if (Feed.Description != null)
Feed.Description.WriteTo (writer, "description", AtomNamespace);
Feed.Description.WriteTo (writer, "subtitle", AtomNamespace);

if (Feed.ImageUrl != null)
writer.WriteElementString ("logo", AtomNamespace, Feed.ImageUrl.ToString ());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ public void WriteTo ()
SyndicationFeed feed = new SyndicationFeed ();
feed.BaseUri = new Uri ("http://mono-project.com");
feed.Copyright = new TextSyndicationContent ("No rights reserved");
feed.Description = new TextSyndicationContent ("A sample feed for unit testing");
feed.Generator = "mono test generator";
// .NET bug: it ignores this value.
feed.Id = "urn:myid";
Expand All @@ -169,7 +170,7 @@ public void WriteTo ()
StringWriter sw = new StringWriter ();
using (XmlWriter w = CreateWriter (sw))
new Atom10FeedFormatter (feed).WriteTo (w);
Assert.AreEqual ("<feed xml:base=\"http://mono-project.com/\" xmlns=\"http://www.w3.org/2005/Atom\"><title type=\"text\"></title><id>XXX</id><rights type=\"text\">No rights reserved</rights><updated>2008-01-01T00:00:00Z</updated><logo>http://mono-project.com/images/mono.png</logo><generator>mono test generator</generator></feed>", DummyId (sw.ToString ()));
Assert.AreEqual ("<feed xml:base=\"http://mono-project.com/\" xmlns=\"http://www.w3.org/2005/Atom\"><title type=\"text\"></title><id>XXX</id><rights type=\"text\">No rights reserved</rights><updated>2008-01-01T00:00:00Z</updated><subtitle type=\"text\">A sample feed for unit testing</subtitle><logo>http://mono-project.com/images/mono.png</logo><generator>mono test generator</generator></feed>", DummyId (sw.ToString ()));
}

[Test]
Expand Down

0 comments on commit b06fc16

Please sign in to comment.