public void Verify_AreEqual_WithDifferentObjects_ReturnsFalse()
        {
            // Arrange
            var mapper = new CharacterIssueMapper();
            var model  = CharacterIssuesMockingSetup.DoMockingSetupForCharacterIssueModel(1);
            var entity = CharacterIssuesMockingSetup.DoMockingSetupForCharacterIssue(2);
            // Act
            var result = mapper.AreEqual(model.Object, entity.Object);

            // Assert
            Assert.False(result);
        }
        public void Verify_MapToModelLite_AssignsLiteOnlyCharacterIssueProperties()
        {
            // Arrange
            var mapper = new CharacterIssueMapper();
            var entity = CharacterIssuesMockingSetup.DoMockingSetupForCharacterIssue();
            // Act
            var model = mapper.MapToModelLite(entity.Object);

            // Assert
            // <None>
            // Related Objects
            Assert.Equal(entity.Object.CharacterId, model.CharacterId);
            Assert.Equal(entity.Object.IssueId, model.IssueId);
        }
        public void Verify_MapToModelListingExtension_CallsMapToModel()
        {
            // Arrange
            var mockMapper = new Mock <CharacterIssueMapper>();

            mockMapper.Setup(x => x.MapToModelListing(It.IsAny <ICharacterIssue>(), It.IsAny <int>()));
            var mockEntity = CharacterIssuesMockingSetup.DoMockingSetupForCharacterIssue(1);

            CharacterIssueMapperExtensions.OverrideMapper(mockMapper.Object);
            // Act
            mockEntity.Object.MapToModelListing();
            // Assert
            mockMapper.Verify(x => x.MapToModelListing(It.IsAny <ICharacterIssue>(), It.IsAny <int>()), Times.Once);
        }
        public void Verify_AreEqualExtension_CallsAreEqual()
        {
            // Arrange
            var mockMapper = new Mock <CharacterIssueMapper>();

            mockMapper.Setup(x => x.AreEqual(It.IsAny <ICharacterIssueModel>(), It.IsAny <ICharacterIssue>()));
            CharacterIssueMapperExtensions.OverrideMapper(mockMapper.Object);
            var mockModel  = CharacterIssuesMockingSetup.DoMockingSetupForCharacterIssueModel(1);
            var mockEntity = CharacterIssuesMockingSetup.DoMockingSetupForCharacterIssue(1);

            // Act
            mockModel.Object.AreEqual(mockEntity.Object);
            // Assert
            mockMapper.Verify(x => x.AreEqual(It.IsAny <ICharacterIssueModel>(), It.IsAny <ICharacterIssue>()), Times.Once);
        }