コード例 #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
ファイル: EqualityTests.cs プロジェクト: nithinphilips/SMOz
        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
ファイル: EqualityTests.cs プロジェクト: nithinphilips/SMOz
        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);
        }