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

xmlSpace_7() public method

public xmlSpace_7 ( ) : int
return int
                public int xmlSpace_7()
                {
                    using (XmlWriter w = CreateWriter())
                    {
                        try
                        {
                            w.WriteStartElement("Root");
                            w.WriteStartElement("node", null);
                            w.WriteAttributeString("xml", "space", null, "reserve");
                        }
                        catch (ArgumentException 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;
                }