public int writeAttributes_3()
{
using (XmlWriter w = CreateWriter())
{
XmlReader xr = null;
try
{
w.WriteStartElement("Root");
w.WriteAttributes(xr, false);
}
catch (ArgumentNullException e)
{
CError.WriteLineIgnore("Exception: " + e.ToString());
CError.Compare(w.WriteState, WriteState.Element, "WriteState should be Element");
return TEST_PASS;
}
}
CError.WriteLine("Did not throw exception");
return TEST_FAIL;
}