public void TestEquals()
        {
            Blah a = new Blah("abc", 1);
            Blah b = new Blah(string.Format("ab{0}", 'c'), 1);

            Assert.AreEqual(a.Equals(b), true, "#01");
        }
Esempio n. 2
0
		public void TestGetHash ()
		{
			Blah a = new Blah ("abc", 1);
			Blah b = new Blah (string.Format ("ab{0}", 'c'), 1);
			Assert.AreEqual (a.GetHashCode (), b.GetHashCode (), "#01");

			Lalala la = new Lalala ("abc", 1);
			Lalala lb = new Lalala (string.Format ("ab{0}", 'c'), 1);
			Assert.AreEqual (la.GetHashCode (), lb.GetHashCode (), "#02");

			a = new Blah (null, 1);
			b = new Blah (null, 1);
			Assert.AreEqual (la.GetHashCode (), lb.GetHashCode (), "#03");

			la = new Lalala (null, 1);
			lb = new Lalala (null, 1);
			Assert.AreEqual (la.GetHashCode (), lb.GetHashCode (), "#04");
		}
        public void TestGetHash()
        {
            Blah a = new Blah("abc", 1);
            Blah b = new Blah(string.Format("ab{0}", 'c'), 1);

            Assert.AreEqual(a.GetHashCode(), b.GetHashCode(), "#01");

            Lalala la = new Lalala("abc", 1);
            Lalala lb = new Lalala(string.Format("ab{0}", 'c'), 1);

            Assert.AreEqual(la.GetHashCode(), lb.GetHashCode(), "#02");

            a = new Blah(null, 1);
            b = new Blah(null, 1);
            Assert.AreEqual(la.GetHashCode(), lb.GetHashCode(), "#03");

            la = new Lalala(null, 1);
            lb = new Lalala(null, 1);
            Assert.AreEqual(la.GetHashCode(), lb.GetHashCode(), "#04");
        }
Esempio n. 4
0
		public void TestEquals ()
		{
			Blah a = new Blah ("abc", 1);
			Blah b = new Blah (string.Format ("ab{0}", 'c'), 1);
			Assert.AreEqual (a.Equals (b), true, "#01");
		}