public void TestMoreComplexObject()
        {
            MoreComplexObject objReturn;
            MoreComplexObject objTest = new MoreComplexObject();

            objReturn = (MoreComplexObject)Serialize(objTest);
            Assertion.AssertEquals("#Equals", objTest, objReturn);
            objReturn.OnTrucEvent("bidule");
            Assertion.AssertEquals("#dlg", "bidule", objReturn.ObjString);
        }
Exemple #2
0
        public void TestMoreComplexObject()
        {
            MoreComplexObject objReturn;
            MoreComplexObject objTest = new MoreComplexObject();

            objReturn = (MoreComplexObject)Serialize(objTest);
            Assert.AreEqual(objTest, objReturn, "#Equals");
            objReturn.OnTrucEvent("bidule");
            Assert.AreEqual("bidule", objReturn.ObjString, "#dlg");
        }
Exemple #3
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()));
        }
        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()));
        }
		public void TestMoreComplexObject() {
			MoreComplexObject objReturn;
			MoreComplexObject objTest = new MoreComplexObject();
			objReturn = (MoreComplexObject) Serialize(objTest);
			Assertion.AssertEquals("#Equals", objTest, objReturn);
			objReturn.OnTrucEvent("bidule");
			Assertion.AssertEquals("#dlg", "bidule", objReturn.ObjString);
		}
		public void TestMoreComplexObject() {
			MoreComplexObject objReturn;
			MoreComplexObject objTest = new MoreComplexObject();
			objReturn = (MoreComplexObject) Serialize(objTest);
			Assert.AreEqual(objTest, objReturn, "#Equals");
			objReturn.OnTrucEvent("bidule");
			Assert.AreEqual("bidule", objReturn.ObjString, "#dlg");
		}