public void WriteTo()
        {
            var s = new ServiceDocument();
            var a = new AtomPub10ServiceDocumentFormatter(s);

            Assert.AreEqual("http://www.w3.org/2007/app", a.Version, "#1");
            Assert.IsTrue(a.CanRead(XmlReader.Create(new StringReader(app1))), "#2");
            var sw = new StringWriter();

            using (var xw = XmlWriter.Create(sw, settings))
                a.WriteTo(xw);
            Assert.AreEqual(app1, sw.ToString(), "#3");
        }
        public void WriteTo2()
        {
            var s  = new ServiceDocument();
            var ws = new Workspace("test title", null);
            var rc = new ResourceCollectionInfo("test resource", new Uri("urn:foo"));

            rc.Accepts.Add("application/atom+xml;type=entry");
            ws.Collections.Add(rc);
            s.Workspaces.Add(ws);
            var a = new AtomPub10ServiceDocumentFormatter(s);

            Assert.AreEqual("http://www.w3.org/2007/app", a.Version, "#1");
            Assert.IsTrue(a.CanRead(XmlReader.Create(new StringReader(app2))), "#2");
            var sw = new StringWriter();

            using (var xw = XmlWriter.Create(sw, settings))
                a.WriteTo(xw);
            Assert.AreEqual(app2, sw.ToString(), "#3");
        }