public void ReadXml_ThrowsFormatException_RethrowsAsXmlException() { var reader = new ThrowingXmlReader(new FormatException()); IXmlSerializable formatter = new AtomPub10CategoriesDocumentFormatter(); Assert.Throws <XmlException>(() => formatter.ReadXml(reader)); }
public void ReadXml_NullReader_ThrowsArgumentNullException() { IXmlSerializable formatter = new AtomPub10CategoriesDocumentFormatter(); AssertExtensions.Throws <ArgumentNullException>("reader", () => formatter.ReadXml(null)); }