public void TypeMapIdentity_object_object() { TypeMapIdentity identity1 = TypeMapIdentity.GetIdentity <int, int>(); TypeMapIdentity identity2 = TypeMapIdentity.GetIdentity <object, object>(); Assert.IsFalse(identity1.Equals(identity2)); Assert.IsFalse(identity1 == (object)identity2); Assert.IsTrue(identity1 != (object)identity2); }
public void TypeMapIdentity_object_int() { TypeMapIdentity identity1 = TypeMapIdentity.GetIdentity <int, int>(); TypeMapIdentity identity2 = TypeMapIdentity.GetIdentity <int, int>(); object identity3 = new object(); Assert.IsTrue(identity1.Equals(identity2)); Assert.IsTrue(identity1 == identity2); Assert.IsFalse(identity1 != identity2); Assert.IsFalse(identity1 == identity3); Assert.IsFalse(identity3 == identity1); Assert.IsTrue(identity1 != identity3); Assert.IsTrue(identity3 != identity1); Assert.IsFalse(identity1 == null); Assert.IsFalse(null == identity1); Assert.IsFalse(identity1 != identity2); }