System.Xml.Tests.TCFullEndElement.TCWhiteSpace.whitespace_5 C# (CSharp) Method

whitespace_5() public method

public whitespace_5 ( ) : int
return int
            public int whitespace_5()
            {
                using (XmlWriter w = CreateWriter())
                {
                    try
                    {
                        w.WriteStartElement("Root");
                        w.WriteWhitespace(CurVariation.Param.ToString());
                    }
                    catch (ArgumentException e)
                    {
                        CError.WriteLineIgnore("Exception: " + e.ToString());
                        CError.Compare(w.WriteState, (WriterType == WriterType.CharCheckingWriter) ? WriteState.Element : WriteState.Error, "WriteState should be Error");
                        return TEST_PASS;
                    }
                }
                CError.WriteLine("Did not throw exception");
                return TEST_FAIL;
            }
        }