System.Xml.Tests.TCWriteNode_With_ReadValueChunk.writeNode_2 C# (CSharp) Method

writeNode_2() public method

public writeNode_2 ( ) : int
return int
        public int writeNode_2()
        {
            int size = Int32.Parse(CurVariation.Param.ToString());
            using (XmlReader r = this.CreateReader(size))
            {
                using (XmlWriter w = CreateWriter())
                {
                    while (r.Read())
                    {
                        w.WriteNode(r, false);
                    }
                }
            }

            switch (size)
            {
                case 1023:
                    return CompareBaseline("textnode_1K-1_unicode.xml") ? TEST_PASS : TEST_FAIL;
                case 1024:
                    return CompareBaseline("textnode_1K_unicode.xml") ? TEST_PASS : TEST_FAIL;
                case 1025:
                    return CompareBaseline("textnode_1K+1_unicode.xml") ? TEST_PASS : TEST_FAIL;
                case 2048:
                    return CompareBaseline("textnode_2K_unicode.xml") ? TEST_PASS : TEST_FAIL;
                case 4096:
                    return CompareBaseline("textnode_4K_unicode.xml") ? TEST_PASS : TEST_FAIL;
            }
            CError.WriteLine("Error");
            return TEST_FAIL;
        }