Ejemplo n.º 1
0
 public void EqualsSuccess()
 {
     Assert.IsTrue(sk.Equals(skzero));
     Assert.IsFalse(sk.Equals("0"));
     Assert.IsFalse(sk.Equals(" "));
     Assert.IsFalse(sk.Equals("1"));
 }
Ejemplo n.º 2
0
        public static void EqualsMisMatchedObjectsTest()
        {
            StringKey stringKey1 = new StringKey("A");
            StringKey stringKey2 = new StringKey("B");

            Assert.IsFalse(stringKey1.Equals(stringKey2));
        }
Ejemplo n.º 3
0
        public static void EqualsDifferentObjectsWithMatchingNameTest()
        {
            StringKey stringKey1 = new StringKey("A");
            StringKey stringKey2 = new StringKey("A");

            Assert.IsTrue(stringKey1.Equals(stringKey2));
        }
Ejemplo n.º 4
0
        public void EqualsTestWithDiffKeyName()
        {
            StringKey stringKey = new StringKey("Unit");

            StringKey otherStringKey = new StringKey("Test");

            Assert.AreEqual(false, stringKey.Equals(otherStringKey));
        }
Ejemplo n.º 5
0
        public void EqualsTestWithSameKeyName()
        {
            string key = "Test Key";

            StringKey stringKey = new StringKey(key);

            StringKey otherStringKey = new StringKey(key);

            Assert.AreEqual(true, stringKey.Equals(otherStringKey));
        }
Ejemplo n.º 6
0
        public void EqualsTestWithSameMemoryReference()
        {
            StringKey stringKey = new StringKey("Test");

            Assert.AreEqual(true, stringKey.Equals(stringKey));
        }
Ejemplo n.º 7
0
        public void EqualsTestWithOtherType()
        {
            StringKey stringKey = new StringKey("Test");

            Assert.AreEqual(false, stringKey.Equals(new Item("A", 1, 1.5)));
        }
Ejemplo n.º 8
0
        public void EqualsTestWithNull()
        {
            StringKey stringKey = new StringKey("Test");

            Assert.AreEqual(false, stringKey.Equals(null));
        }
Ejemplo n.º 9
0
        public static void EqualsNonStringKeyObjectTest()
        {
            StringKey stringKey = new StringKey("A");

            Assert.IsFalse(stringKey.Equals("Not a string key"));
        }
Ejemplo n.º 10
0
        public static void EqualsNullObjectTest()
        {
            StringKey stringKey = new StringKey("A");

            Assert.IsFalse(stringKey.Equals(null));
        }
Ejemplo n.º 11
0
        public static void EqualsSameObjectTest()
        {
            StringKey stringKey = new StringKey("A");

            Assert.IsTrue(stringKey.Equals(stringKey));
        }