diff options
author | Linquize <linquize@yahoo.com.hk> | 2013-07-12 17:33:45 +0400 |
---|---|---|
committer | Linquize <linquize@yahoo.com.hk> | 2013-07-23 04:12:35 +0400 |
commit | ee48fc81a9187d44b68ae15328e5336bc6e72141 (patch) | |
tree | 4366711d9e1356fb84eade00b1010f42a9a4bf79 /mcs/class/System.ServiceModel.Web | |
parent | 5b8a026a06d57bdda8cc186c4baefed665210732 (diff) |
Atom10FeedFormatter should generate subtitle tag for Description property
Diffstat (limited to 'mcs/class/System.ServiceModel.Web')
2 files changed, 3 insertions, 2 deletions
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/Atom10FeedFormatter.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/Atom10FeedFormatter.cs index 99072bee908..5cf086e73b8 100644 --- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/Atom10FeedFormatter.cs +++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/Atom10FeedFormatter.cs @@ -476,7 +476,7 @@ namespace System.ServiceModel.Syndication } 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 ()); diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Atom10FeedFormatterTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Atom10FeedFormatterTest.cs index 85d402a1dc5..c3eacb5cc39 100644 --- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Atom10FeedFormatterTest.cs +++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Atom10FeedFormatterTest.cs @@ -160,6 +160,7 @@ namespace MonoTests.System.ServiceModel.Syndication 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"; @@ -169,7 +170,7 @@ namespace MonoTests.System.ServiceModel.Syndication 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] |