示例#1
0
        public void Equals_Should_ReturnFalse_When_DifferentEntityIsPassedAsObject()
        {
            var entityBase1 = new EntityBaseMock(Guid.NewGuid());
            var entityBase2 = new EntityBaseMock(Guid.NewGuid());

            Assert.False(entityBase1.Equals((object)entityBase2));
        }
示例#2
0
        public void Equals_Should_ReturnFalse_When_TwoObjectsAreNotEqual()
        {
            var entityBase1 = new EntityBaseMock(Guid.NewGuid());
            var entityBase2 = new EntityBaseMock(Guid.NewGuid());

            Assert.False(entityBase1.Equals(entityBase2));
        }
示例#3
0
        public void Equals_Should_ReturnTrue_When_EqualEntityIsPassedAsObject()
        {
            var id          = Guid.NewGuid();
            var entityBase1 = new EntityBaseMock(id);
            var entityBase2 = new EntityBaseMock(id);

            Assert.True(entityBase1.Equals((object)entityBase2));
        }
示例#4
0
        public void Equals_Should_ReturnTrue_When_TwoObjectsAreEqual()
        {
            var id          = Guid.NewGuid();
            var entityBase1 = new EntityBaseMock(id);
            var entityBase2 = new EntityBaseMock(id);

            Assert.True(entityBase1.Equals(entityBase2));
        }
示例#5
0
        public void Equals_Should_ReturnFalse_When_TheObjectIsNull()
        {
            var entityBase = new EntityBaseMock(Guid.NewGuid());

            Assert.False(entityBase.Equals(null));
        }