Ejemplo n.º 1
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");
        }
Ejemplo 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");
		}
Ejemplo n.º 3
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");
        }
Ejemplo 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");
		}