System.Xml.Tests.TCFullEndElement.TCWriteValue.TCXmlLang.XmlLang_4 C# (CSharp) Méthode

XmlLang_4() public méthode

public XmlLang_4 ( ) : int
Résultat int
                public int XmlLang_4()
                {
                    /*if (WriterType == WriterType.XmlTextWriter)
                        return TEST_SKIPPED;*/

                    using (XmlWriter w = CreateWriter())
                    {
                        try
                        {
                            w.WriteStartElement("Root");
                            w.WriteAttributeString("xml", "lang", null, "en-us");
                            w.WriteAttributeString("xml", "lang", null, "ja");
                        }
                        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;
                }