Equals() public method

public Equals ( object o ) : bool
o object
return bool
		public void Equals ()
		{
			ApplicationMembershipCondition app = new ApplicationMembershipCondition ();
			Assert.IsFalse (app.Equals (null), "Equals(null)");
			ApplicationMembershipCondition g2 = new ApplicationMembershipCondition ();
			Assert.IsTrue (app.Equals (g2), "Equals(g2)");
			Assert.IsTrue (g2.Equals (app), "Equals(app)");
			Assert.IsFalse (app.Equals (new object ()), "Equals (object)");
		}
		public void FromXml_NonBooleanLookAtDir ()
		{
			ApplicationMembershipCondition app = new ApplicationMembershipCondition ();
			SecurityElement se = app.ToXml ();

			SecurityElement w = new SecurityElement (se.Tag);
			w.AddAttribute ("class", se.Attribute ("class"));
			w.AddAttribute ("version", se.Attribute ("version"));
			w.AddAttribute ("LookAtDir", "Maybe"); // not (generally) a boolean ;)

			ApplicationMembershipCondition app2 = new ApplicationMembershipCondition ();
			app2.FromXml (w);

			se = app2.ToXml ();
			Assert.IsNull (se.Attribute ("LookAtDir"), "LookAtDir");
			// LookAtDir isn't part of the Equals computation
			Assert.IsTrue (app2.Equals (app), "Equals-1");
			Assert.IsTrue (app.Equals (app2), "Equals-2");

			ApplicationMembershipCondition app3 = (ApplicationMembershipCondition)app2.Copy ();
			se = app3.ToXml ();
			// LookAtDir isn't copied either
			Assert.AreEqual ("true", se.Attribute ("LookAtDir"), "Copy-LookAtDir");
		}