CheckArray() public static method

public static CheckArray ( object objTest, object objReturn ) : bool
objTest object
objReturn object
return bool
Beispiel #1
0
        public override bool Equals(object obj)
        {
            MoreComplexObject objReturn = obj as MoreComplexObject;

            if (objReturn == null)
            {
                return(false);
            }
            if (objReturn._string != this._string)
            {
                return(false);
            }

            Assert.AreEqual(_table.Count, objReturn._table.Count, "#1");
            foreach (var e in objReturn._table)
            {
                Assert.AreEqual(e.Value, _table[e.Key], e.Key.ToString());
            }
            return(SoapFormatterTest.CheckArray(this._queue.ToArray(), objReturn._queue.ToArray()));
        }
Beispiel #2
0
        public override bool Equals(object obj)
        {
            MoreComplexObject objReturn = obj as MoreComplexObject;

            if (objReturn == null)
            {
                return(false);
            }
            if (objReturn._string != this._string)
            {
                return(false);
            }
            IEnumerator myEnum = this._table.GetEnumerator();

            foreach (DictionaryEntry e in objReturn._table)
            {
                myEnum.MoveNext();
                DictionaryEntry s = (DictionaryEntry)myEnum.Current;
                Assertion.AssertEquals("#_table", s.Key, e.Key);
                Assertion.AssertEquals("#_table", s.Value, e.Value);
                if (s.Key.ToString() != e.Key.ToString() || s.Value.ToString() != e.Value.ToString())
                {
                    return(false);
                }
            }
//			Assertion.Assert("#_table is null", objReturn._table != null);
//			Console.WriteLine("_table[foo]: {0}", objReturn._table["foo"]);
//			Assertion.AssertEquals("#_table[\"foo\"]", "barr", objReturn._table["foo"]);
//			Console.WriteLine("_table[1]: {0}", objReturn._table[1]);
//			Assertion.AssertEquals("#_table[1]", "foo", objReturn._table[1]);
//			Console.WriteLine("_table['c']: {0}", objReturn._table['c']);
//			Assertion.AssertEquals("#_table['c']", "barr", objReturn._table['c']);
//			Console.WriteLine("_table[barr]: {0}", objReturn._table["barr"]);
//			Assertion.AssertEquals("#_table[\"barr\"]", 1234567890, objReturn._table["barr"]);
            return(SoapFormatterTest.CheckArray(this._queue.ToArray(), objReturn._queue.ToArray()));
        }