public int writeQName_4()
{
using (XmlWriter w = CreateWriter())
{
try
{
w.WriteStartElement("root");
w.WriteQualifiedName("bar", "foo");
w.WriteEndElement();
}
catch (ArgumentException e)
{
CError.WriteLineIgnore(e.ToString());
if (WriterType == WriterType.CustomWriter)
{
CError.Compare(w.WriteState, WriteState.Element, "WriteState should be Element");
}
else
{
CError.Compare(w.WriteState, WriteState.Error, "WriteState should be Error");
}
return TEST_PASS;
}
}
CError.WriteLine("Did not throw exception");
return TEST_FAIL;
}