示例#1
0
 public void EqualsTest()
 {
     CategoryItem target = new CategoryItem("Hello", CategoryItemType.String);
     object obj = null;
     bool actual = target.Equals(obj);
     Assert.AreEqual(false, actual);
 }
示例#2
0
        public void EqualsTest()
        {
            CategoryItem target = new CategoryItem("Hello", CategoryItemType.String);
            object       obj    = null;
            bool         actual = target.Equals(obj);

            Assert.AreEqual(false, actual);
        }
示例#3
0
        public void CategoryItemEquality()
        {
            CategoryItem a = new CategoryItem("Hello", CategoryItemType.String);
            CategoryItem b = new CategoryItem("Hello", CategoryItemType.String);

            Assert.IsTrue(a == b, "Equality operator failed");
            Assert.AreEqual(true, a.Equals(b), "Explicit call to IEquatable<T> method failed");
            Assert.AreEqual(a, b, "Generic Assert.AreEqual call failed");
        }
示例#4
0
        public void CategoryItemEquality()
        {
            CategoryItem a = new CategoryItem("Hello", CategoryItemType.String);
            CategoryItem b = new CategoryItem("Hello", CategoryItemType.String);

            Assert.IsTrue(a == b, "Equality operator failed");
            Assert.AreEqual(true, a.Equals(b), "Explicit call to IEquatable<T> method failed");
            Assert.AreEqual(a, b, "Generic Assert.AreEqual call failed");
        }
示例#5
0
 public void EqualsTest1()
 {
     CategoryItem target = new CategoryItem("Hello", CategoryItemType.String);
     object obj = new CategoryItem("Hello", CategoryItemType.String);
     bool expected = true; 
     bool actual;
     actual = target.Equals(obj);
     Assert.AreEqual(expected, actual);
 }
示例#6
0
        public void EqualsTest1()
        {
            CategoryItem target   = new CategoryItem("Hello", CategoryItemType.String);
            object       obj      = new CategoryItem("Hello", CategoryItemType.String);
            bool         expected = true;
            bool         actual;

            actual = target.Equals(obj);
            Assert.AreEqual(expected, actual);
        }