public void Verify_That_WriteXml_Throws_Exception_When_Type_Is_Null()
        {
            using var memoryStream = new MemoryStream();
            using var writer       = XmlWriter.Create(memoryStream, new XmlWriterSettings { Indent = true });

            var attributeDefinitionXhtml = new AttributeDefinitionXHTML();

            Assert.That(() => attributeDefinitionXhtml.WriteXml(writer), Throws.Exception.TypeOf <SerializationException>());
        }
 public void VerifyThatWriteXmlThrowsExceptionWhenTypeIsNull()
 {
     using (var fs = new FileStream("test.xml", FileMode.Create))
     {
         using (var writer = XmlWriter.Create(fs, new XmlWriterSettings {
             Indent = true
         }))
         {
             var attributeDefinitionXhtml = new AttributeDefinitionXHTML();
             Assert.Throws <SerializationException>(() => attributeDefinitionXhtml.WriteXml(writer));
         }
     }
 }