Пример #1
0
 public void EqualsSuccess()
 {
     Assert.IsTrue(sk.Equals(skzero));
     Assert.IsFalse(sk.Equals("0"));
     Assert.IsFalse(sk.Equals(" "));
     Assert.IsFalse(sk.Equals("1"));
 }
Пример #2
0
        public static void EqualsMisMatchedObjectsTest()
        {
            StringKey stringKey1 = new StringKey("A");
            StringKey stringKey2 = new StringKey("B");

            Assert.IsFalse(stringKey1.Equals(stringKey2));
        }
Пример #3
0
        public static void EqualsDifferentObjectsWithMatchingNameTest()
        {
            StringKey stringKey1 = new StringKey("A");
            StringKey stringKey2 = new StringKey("A");

            Assert.IsTrue(stringKey1.Equals(stringKey2));
        }
Пример #4
0
        public void EqualsTestWithDiffKeyName()
        {
            StringKey stringKey = new StringKey("Unit");

            StringKey otherStringKey = new StringKey("Test");

            Assert.AreEqual(false, stringKey.Equals(otherStringKey));
        }
Пример #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));
        }
Пример #6
0
        public void EqualsTestWithSameMemoryReference()
        {
            StringKey stringKey = new StringKey("Test");

            Assert.AreEqual(true, stringKey.Equals(stringKey));
        }
Пример #7
0
        public void EqualsTestWithOtherType()
        {
            StringKey stringKey = new StringKey("Test");

            Assert.AreEqual(false, stringKey.Equals(new Item("A", 1, 1.5)));
        }
Пример #8
0
        public void EqualsTestWithNull()
        {
            StringKey stringKey = new StringKey("Test");

            Assert.AreEqual(false, stringKey.Equals(null));
        }
Пример #9
0
        public static void EqualsNonStringKeyObjectTest()
        {
            StringKey stringKey = new StringKey("A");

            Assert.IsFalse(stringKey.Equals("Not a string key"));
        }
Пример #10
0
        public static void EqualsNullObjectTest()
        {
            StringKey stringKey = new StringKey("A");

            Assert.IsFalse(stringKey.Equals(null));
        }
Пример #11
0
        public static void EqualsSameObjectTest()
        {
            StringKey stringKey = new StringKey("A");

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