示例#1
0
        public void EntityEquals_Success_Should_ReturnTrue_Detail_SameReference()
        {
            // Arrange
            IEntity entity = new OtherEntity(1, 2);


            // Assert
            entity.EntityEquals(entity).Should().BeTrue();
        }
示例#2
0
        public void EntityEquals_Success_Should_ReturnTrue_Detail_FirstEntityAllKeysNull()
        {
            // Arrange
            IEntity entity  = new OtherEntity(null, null);
            IEntity entity1 = new OtherEntity(3, 2);


            // Assert
            entity.EntityEquals(entity1).Should().BeFalse();
        }
示例#3
0
        public void EntityEquals_Success_Should_ReturnTrue_Detail_OneDifferentKeyValues()
        {
            // Arrange
            IEntity entity  = new OtherEntity(1, 2);
            IEntity entity1 = new OtherEntity(3, 2);


            // Assert
            entity.EntityEquals(entity1).Should().BeFalse();
        }
示例#4
0
        public void EntityEquals_Success_Should_ReturnFalse_Detail_OtherIsDifferentTypeAndHAsDifferentKeyLength()
        {
            // Arrange
            IEntity entity  = new OtherEntity(1, 2);
            IEntity entity1 = new OtherAnotherOtherEntity(12);


            // Assert
            entity.EntityEquals(entity1).Should().BeFalse();
        }
示例#5
0
        public void EntityEquals_Success_Should_ReturnFalse_Detail_OtherIsNull()
        {
            // Arrange
            IEntity entity  = new OtherEntity(1, 2);
            IEntity?entity1 = null;


            // Assert
            entity.EntityEquals(entity1).Should().BeFalse();
        }
示例#6
0
        public void EntityEquals_Success_Should_ReturnTrue_Detail_SecondEntitySecondKeyIsNull()
        {
            // Arrange
            IEntity entity  = new OtherEntity(1, 2);
            IEntity entity1 = new OtherEntity(2, null);


            // Assert
            entity.EntityEquals(entity1).Should().BeFalse();
        }