public void EqualsSuccess() { Assert.IsTrue(sk.Equals(skzero)); Assert.IsFalse(sk.Equals("0")); Assert.IsFalse(sk.Equals(" ")); Assert.IsFalse(sk.Equals("1")); }
public static void EqualsMisMatchedObjectsTest() { StringKey stringKey1 = new StringKey("A"); StringKey stringKey2 = new StringKey("B"); Assert.IsFalse(stringKey1.Equals(stringKey2)); }
public static void EqualsDifferentObjectsWithMatchingNameTest() { StringKey stringKey1 = new StringKey("A"); StringKey stringKey2 = new StringKey("A"); Assert.IsTrue(stringKey1.Equals(stringKey2)); }
public void EqualsTestWithDiffKeyName() { StringKey stringKey = new StringKey("Unit"); StringKey otherStringKey = new StringKey("Test"); Assert.AreEqual(false, stringKey.Equals(otherStringKey)); }
public void EqualsTestWithSameKeyName() { string key = "Test Key"; StringKey stringKey = new StringKey(key); StringKey otherStringKey = new StringKey(key); Assert.AreEqual(true, stringKey.Equals(otherStringKey)); }
public void EqualsTestWithSameMemoryReference() { StringKey stringKey = new StringKey("Test"); Assert.AreEqual(true, stringKey.Equals(stringKey)); }
public void EqualsTestWithOtherType() { StringKey stringKey = new StringKey("Test"); Assert.AreEqual(false, stringKey.Equals(new Item("A", 1, 1.5))); }
public void EqualsTestWithNull() { StringKey stringKey = new StringKey("Test"); Assert.AreEqual(false, stringKey.Equals(null)); }
public static void EqualsNonStringKeyObjectTest() { StringKey stringKey = new StringKey("A"); Assert.IsFalse(stringKey.Equals("Not a string key")); }
public static void EqualsNullObjectTest() { StringKey stringKey = new StringKey("A"); Assert.IsFalse(stringKey.Equals(null)); }
public static void EqualsSameObjectTest() { StringKey stringKey = new StringKey("A"); Assert.IsTrue(stringKey.Equals(stringKey)); }