Exemple #1
0
 private void AssertNotEqual(TestValue value1, TestValue value2)
 {
     Assert.AreNotEqual(value1, value2);
     Assert.IsTrue(value1 != value2);
     Assert.IsFalse(value1 == value2);
     Assert.IsFalse(value1.Equals(value2));
 }
Exemple #2
0
        public void Equals_ComparingWithWrongType_ReturnsFalse()
        {
            var value = new TestValue {
                Property1 = "string"
            };

            Assert.IsFalse(value.Equals(10));
        }
Exemple #3
0
        public void Equals_ComparingWithNull_ReturnsFalse()
        {
            var value = new TestValue {
                Property1 = "string"
            };

            Assert.IsFalse(value.Equals(null as object));
        }