public void OperatorInEquality()
 {
     AttributeCatalogEntry<DummyAttribute> left = new AttributeCatalogEntry<DummyAttribute>(new DummyAttribute(), GetType());
     AttributeCatalogEntry<DummyAttribute> right = new AttributeCatalogEntry<DummyAttribute>(new DummyAttribute(), typeof(DummyAttribute));
     Assert.IsFalse(left == right);
     Assert.IsTrue(left != right);
 }
 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.º 3
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);
 }
 public void InstanceInequality()
 {
     AttributeCatalogEntry<DummyAttribute> left = new AttributeCatalogEntry<DummyAttribute>(new DummyAttribute(), GetType());
     AttributeCatalogEntry<DummyAttribute> right = new AttributeCatalogEntry<DummyAttribute>(new DummyAttribute(), typeof(DummyAttribute));
     Assert.IsFalse(left.Equals(right));
 }