public void Verify_AreEqual_WithDifferentObjects_ReturnsFalse()
        {
            // Arrange
            var mapper = new CharacterStoryArcMapper();
            var model  = CharacterStoryArcsMockingSetup.DoMockingSetupForCharacterStoryArcModel(1);
            var entity = CharacterStoryArcsMockingSetup.DoMockingSetupForCharacterStoryArc(2);
            // Act
            var result = mapper.AreEqual(model.Object, entity.Object);

            // Assert
            Assert.False(result);
        }
        public void Verify_MapToEntityExtension_CallsMapToEntity()
        {
            // Arrange
            var mockMapper = new Mock <CharacterStoryArcMapper>();

            mockMapper.Setup(x => x.MapToEntity(It.IsAny <ICharacterStoryArcModel>(), It.IsAny <int>()));
            var mockModel = CharacterStoryArcsMockingSetup.DoMockingSetupForCharacterStoryArcModel(1);

            CharacterStoryArcMapperExtensions.OverrideMapper(mockMapper.Object);
            // Act
            mockModel.Object.MapToEntity();
            // Assert
            mockMapper.Verify(x => x.MapToEntity(It.IsAny <ICharacterStoryArcModel>(), It.IsAny <int>()), Times.Once);
        }
        public void Verify_MapToEntity_AssignsCharacterStoryArcProperties()
        {
            // Arrange
            var mapper = new CharacterStoryArcMapper();
            var model  = CharacterStoryArcsMockingSetup.DoMockingSetupForCharacterStoryArcModel();
            // Act
            var entity = mapper.MapToEntity(model.Object);

            // Assert
            // <None>
            // Related Objects
            Assert.Equal(model.Object.CharacterId, entity.CharacterId);
            Assert.Equal(model.Object.StoryArcId, entity.StoryArcId);
            // Associated Objects
            // <None>
        }
        public void Verify_MapToSearchModel_AssignsCharacterStoryArcSearchProperties()
        {
            // Arrange
            var mapper = new CharacterStoryArcMapper();
            var model  = CharacterStoryArcsMockingSetup.DoMockingSetupForCharacterStoryArcModel();
            // Act
            var searchModel = mapper.MapToSearchModel(model.Object);

            // Assert
            Assert.Equal(model.Object.CharacterId, searchModel.CharacterId);
            Assert.Equal(model.Object.Character?.CustomKey, searchModel.CharacterCustomKey);
            Assert.Equal(model.Object.Character?.ApiDetailUrl, searchModel.CharacterApiDetailUrl);
            Assert.Equal(model.Object.Character?.SiteDetailUrl, searchModel.CharacterSiteDetailUrl);
            Assert.Equal(model.Object.Character?.Name, searchModel.CharacterName);
            Assert.Equal(model.Object.Character?.ShortDescription, searchModel.CharacterShortDescription);
            Assert.Equal(model.Object.Character?.Description, searchModel.CharacterDescription);
            Assert.Equal(model.Object.StoryArcId, searchModel.StoryArcId);
            Assert.Equal(model.Object.StoryArc?.CustomKey, searchModel.StoryArcCustomKey);
            Assert.Equal(model.Object.StoryArc?.ApiDetailUrl, searchModel.StoryArcApiDetailUrl);
            Assert.Equal(model.Object.StoryArc?.SiteDetailUrl, searchModel.StoryArcSiteDetailUrl);
            Assert.Equal(model.Object.StoryArc?.Name, searchModel.StoryArcName);
            Assert.Equal(model.Object.StoryArc?.ShortDescription, searchModel.StoryArcShortDescription);
            Assert.Equal(model.Object.StoryArc?.Description, searchModel.StoryArcDescription);
        }