Пример #1
0
		public static AttributeImpl AssertCloneIsEqual(AttributeImpl att)
		{
			AttributeImpl clone = (AttributeImpl) att.Clone();
			Assert.AreEqual(att, clone, "Clone must be equal");
			Assert.AreEqual(att.GetHashCode(), clone.GetHashCode(), "Clone's hashcode must be equal");
			return clone;
		}
Пример #2
0
		public static AttributeImpl AssertCopyIsEqual(AttributeImpl att)
		{
			AttributeImpl copy = (AttributeImpl) System.Activator.CreateInstance(att.GetType());
			att.CopyTo(copy);
			Assert.AreEqual(att, copy, "Copied instance must be equal");
			Assert.AreEqual(att.GetHashCode(), copy.GetHashCode(), "Copied instance's hashcode must be equal");
			return copy;
		}
Пример #3
0
		public static AttributeImpl AssertCopyIsEqual(AttributeImpl att)
		{
			AttributeImpl copy = (AttributeImpl) System.Activator.CreateInstance(att.GetType());
			att.CopyTo(copy);
			Assert.AreEqual(att, copy, "Copied instance must be equal");
			Assert.AreEqual(att.GetHashCode(), copy.GetHashCode(), "Copied instance's hashcode must be equal");
			return copy;
		}
Пример #4
0
		public static AttributeImpl AssertCloneIsEqual(AttributeImpl att)
		{
			AttributeImpl clone = (AttributeImpl) att.Clone();
			Assert.AreEqual(att, clone, "Clone must be equal");
			Assert.AreEqual(att.GetHashCode(), clone.GetHashCode(), "Clone's hashcode must be equal");
			return clone;
		}