public void ShouldNotBeEqualWhenComparingDifferentTypes() {
     var valType = new DummyValueType { Id = 1, Name = "Luis" };
     var anotherType = new AnotherDummyValueType {
         Id = 1,
         Name = "Luis"
     };
     Assert.IsFalse(anotherType.Equals(valType));
 }
示例#2
0
        public void ShouldNotBeEqualWhenComparingDifferentTypes()
        {
            var valType = new DummyValueType {
                Id = 1, Name = "Luis"
            };
            var anotherType = new AnotherDummyValueType {
                Id = 1, Name = "Luis"
            };

            Assert.IsFalse(anotherType.Equals(valType));
        }
        public void ShouldNotBeEqualWhenComparingDifferentTypes()
        {
            var val1 = new DummyValueType {
                Id = 1, Name = "Luis"
            };
            var val2 = new AnotherDummyValueType {
                Id = 1, Name = "Luis"
            };

            // ReSharper disable once SuspiciousTypeConversion.Global
            val2.Equals(val1).Should().BeFalse();
        }
        public void ShouldNotBeEqualWhenComparingDifferentTypes()
        {
            var valType = new DummyValueType {
                Id = 1, Name = "Luis"
            };
            var anotherType = new AnotherDummyValueType {
                Id = 1, Name = "Luis"
            };

            // ReSharper disable once SuspiciousTypeConversion.Global
            Assert.IsFalse(anotherType.Equals(valType));
        }