public void WriteXml_NoDocument_ThrowsInvalidOperationException()
 {
     using (var stringWriter = new StringWriter())
         using (var writer = XmlWriter.Create(stringWriter))
         {
             IXmlSerializable formatter = new AtomPub10CategoriesDocumentFormatter();
             Assert.Throws <InvalidOperationException>(() => formatter.WriteXml(writer));
         }
 }
        public void WriteXml_NullWriter_ThrowsArgumentNullException()
        {
            IXmlSerializable formatter = new AtomPub10CategoriesDocumentFormatter();

            AssertExtensions.Throws <ArgumentNullException>("writer", () => formatter.WriteXml(null));
        }