示例#1
0
		public void Equals_GetHashCode () 
		{
			Evidence e1 = new Evidence ();
			Evidence e2 = new Evidence ();
			Assert.AreEqual (e1.GetHashCode (), e2.GetHashCode (), "GetHashCode-1");
			Assert.IsTrue (e1.Equals (e2), "e1.Equals(e2)");
			e1.AddAssembly (String.Empty);
			e2.AddAssembly (String.Empty);
			Assert.AreEqual (e1.GetHashCode (), e2.GetHashCode (), "GetHashCode-2");
			e1.AddHost (String.Empty);
			e2.AddHost (String.Empty);
			Assert.AreEqual (e1.GetHashCode (), e2.GetHashCode (), "GetHashCode-3");
			Assert.IsTrue (e2.Equals (e1), "e2.Equals(e1)");
		}
		public void Equals_GetHashCode () 
		{
			Evidence e1 = new Evidence ();
			Evidence e2 = new Evidence ();
			AssertEquals ("GetHashCode-1", e1.GetHashCode (), e2.GetHashCode ());
			Assert ("e1.Equals(e2)", e1.Equals (e2));
			e1.AddAssembly (String.Empty);
			e2.AddAssembly (String.Empty);
			AssertEquals ("GetHashCode-2", e1.GetHashCode (), e2.GetHashCode ());
			e1.AddHost (String.Empty);
			e2.AddHost (String.Empty);
			AssertEquals ("GetHashCode-3", e1.GetHashCode (), e2.GetHashCode ());
			Assert ("e2.Equals(e1)", e2.Equals (e1));
		}
		public void Equals_GetHashCode () 
		{
			Evidence e1 = new Evidence ();
			Evidence e2 = new Evidence ();
			Assert ("GetHashCode", e1.GetHashCode () != e2.GetHashCode ());
			Assert ("!e1.Equals(e2)", !e1.Equals (e2));
			Assert ("!e2.Equals(e1)", !e2.Equals (e1));
		}
		public void Equals_GetHashCode () 
		{
			Evidence e1 = new Evidence ();
			Evidence e2 = new Evidence ();
			Assert.IsTrue (e1.GetHashCode () != e2.GetHashCode (), "GetHashCode");
			Assert.IsTrue (!e1.Equals (e2), "!e1.Equals(e2)");
			Assert.IsTrue (!e2.Equals (e1), "!e2.Equals(e1)");
		}