System.Xml.Tests.TCFullEndElement.TCWriteValue.TCWriteBase64.Base64_13 C# (CSharp) Méthode

Base64_13() public méthode

public Base64_13 ( ) : int
Résultat int
                public int Base64_13()
                {
                    byte[] data = new byte[] { 60, 65, 47, 62 }; // <A/>

                    XmlWriterSettings ws = new XmlWriterSettings();
                    ws.ConformanceLevel = ConformanceLevel.Fragment;

                    StringBuilder sb = new StringBuilder();
                    using (XmlWriter w = WriterHelper.Create(sb, ws))
                    {
                        w.WriteBase64(data, 0, data.Length);
                    }


                    String s = sb.ToString();
                    if (String.Compare(s, "PEEvPg==") != 0)
                    {
                        CError.WriteLine("Unexpected output : {0}", s);
                        return TEST_FAIL;
                    }

                    return TEST_PASS;
                }
            }