public void InstanceEquality()
 {
     AttributeCatalogEntry<DummyAttribute> left = new AttributeCatalogEntry<DummyAttribute>(new DummyAttribute(), GetType());
     AttributeCatalogEntry<DummyAttribute> right = new AttributeCatalogEntry<DummyAttribute>(new DummyAttribute(), GetType());
     Assert.IsTrue(left.Equals(right));
     Assert.AreEqual(left.GetHashCode(), right.GetHashCode());
 }
Ejemplo n.º 2
0
 public void AttributeCatalogEntryEquality_AreNotEqual_Types()
 {
     AttributeCatalogEntry<DummyAttribute> left = new AttributeCatalogEntry<DummyAttribute>(new DummyAttribute(), typeof(string));
     AttributeCatalogEntry<DummyAttribute> right = new AttributeCatalogEntry<DummyAttribute>(new DummyAttribute(), typeof(int));
     // should not generate exceptions:
     left.GetHashCode();
     right.GetHashCode();
     Assert.AreNotEqual(left, right);
 }