System.Xml.Tests.TCFullEndElement.TCWriteValue.TCXmlSpace.xmlSpace_8 C# (CSharp) Method

xmlSpace_8() public method

public xmlSpace_8 ( ) : int
return int
                public int xmlSpace_8()
                {
                    using (XmlWriter w = CreateWriter())
                    {
                        try
                        {
                            w.WriteStartElement("Root");
                            w.WriteAttributeString("xml", "space", null, "preserve");
                            w.WriteAttributeString("xml", "space", null, "default");
                        }
                        catch (XmlException e)
                        {
                            CError.WriteLineIgnore(e.ToString());
                            CError.Compare(w.WriteState, WriteState.Error, "WriteState should be Error");
                            return TEST_PASS;
                        }
                    }
                    CError.WriteLine("Exception expected");
                    return TEST_FAIL;
                }