Esempio n. 1
0
        private void Validate(ArrayList[] arraylists, string expected, string name, string description)
        {
            MultiArrayListEnumerable male = new MultiArrayListEnumerable(new ArrayList[] { m_al1, m_al2, m_al3 });

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            foreach (string s in male)
            {
                sb.Append(s);
            }
            string result = sb.ToString();

            Console.WriteLine(name + "\r\n\texpected = \"" + expected + "\",\r\n\tresult   = \"" + result + "\".\r\n\t\t" + (result.Equals(expected)?"Passed.\r\n":"Failed.\r\n"));
            _Debug.Assert(result.Equals(expected), "MultiArrayListEnumerable basics", "Failed test");
        }
Esempio n. 2
0
        public void TestBasicsOfEnumerator()
        {
            MultiArrayListEnumerable male = new MultiArrayListEnumerable(new ArrayList[] { m_al1, m_al2, m_al3 });

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            foreach (string s in male)
            {
                sb.Append(s);
            }

            string result = sb.ToString();

            Console.WriteLine("Simple three list aggregation - " + result + ".");
            _Debug.Assert(result.Equals(m_expected123), "MultiArrayListEnumerable basics", "Failed test");
        }