public int writeNode_XmlReader1()
{
XmlReader xr = null;
using (XmlWriter w = CreateWriter())
{
try
{
w.WriteStartElement("Root");
w.WriteNode(xr, false);
}
catch (ArgumentNullException)
{
CError.Compare(w.WriteState, WriteState.Element, "WriteState should be Element");
return TEST_PASS;
}
}
CError.WriteLine("Did not throw exception");
return TEST_FAIL;
}