public int BinHex_7()
{
using (XmlWriter w = CreateWriter())
{
try
{
w.WriteStartElement("root");
w.WriteBinHex(null, 0, 0);
}
catch (ArgumentNullException)
{
if (WriterType == WriterType.CustomWriter)
{
CError.Compare(w.WriteState, WriteState.Element, "WriteState should be Element");
}
else
{
CheckErrorState(w.WriteState);
}
return TEST_PASS;
}
}
CError.WriteLine("Did not throw exception");
return TEST_FAIL;
}