public void Verify_AreEqual_WithDifferentObjects_ReturnsFalse()
        {
            // Arrange
            var mapper = new EpisodeCharacterFirstAppearanceMapper();
            var model  = EpisodeCharacterFirstAppearancesMockingSetup.DoMockingSetupForEpisodeCharacterFirstAppearanceModel(1);
            var entity = EpisodeCharacterFirstAppearancesMockingSetup.DoMockingSetupForEpisodeCharacterFirstAppearance(2);
            // Act
            var result = mapper.AreEqual(model.Object, entity.Object);

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

            mockMapper.Setup(x => x.MapToEntity(It.IsAny <IEpisodeCharacterFirstAppearanceModel>(), It.IsAny <int>()));
            var mockModel = EpisodeCharacterFirstAppearancesMockingSetup.DoMockingSetupForEpisodeCharacterFirstAppearanceModel(1);

            EpisodeCharacterFirstAppearanceMapperExtensions.OverrideMapper(mockMapper.Object);
            // Act
            mockModel.Object.MapToEntity();
            // Assert
            mockMapper.Verify(x => x.MapToEntity(It.IsAny <IEpisodeCharacterFirstAppearanceModel>(), It.IsAny <int>()), Times.Once);
        }
        public void Verify_MapToModelLite_AssignsLiteOnlyEpisodeCharacterFirstAppearanceProperties()
        {
            // Arrange
            var mapper = new EpisodeCharacterFirstAppearanceMapper();
            var entity = EpisodeCharacterFirstAppearancesMockingSetup.DoMockingSetupForEpisodeCharacterFirstAppearance();
            // Act
            var model = mapper.MapToModelLite(entity.Object);

            // Assert
            // <None>
            // Related Objects
            Assert.Equal(entity.Object.EpisodeId, model.EpisodeId);
            Assert.Equal(entity.Object.CharacterId, model.CharacterId);
        }
        public void Verify_MapToEntity_AssignsEpisodeCharacterFirstAppearanceProperties()
        {
            // Arrange
            var mapper = new EpisodeCharacterFirstAppearanceMapper();
            var model  = EpisodeCharacterFirstAppearancesMockingSetup.DoMockingSetupForEpisodeCharacterFirstAppearanceModel();
            // Act
            var entity = mapper.MapToEntity(model.Object);

            // Assert
            // <None>
            // Related Objects
            Assert.Equal(model.Object.EpisodeId, entity.EpisodeId);
            Assert.Equal(model.Object.CharacterId, entity.CharacterId);
            // Associated Objects
            // <None>
        }
        public void Verify_MapToSearchModel_AssignsEpisodeCharacterFirstAppearanceSearchProperties()
        {
            // Arrange
            var mapper = new EpisodeCharacterFirstAppearanceMapper();
            var model  = EpisodeCharacterFirstAppearancesMockingSetup.DoMockingSetupForEpisodeCharacterFirstAppearanceModel();
            // Act
            var searchModel = mapper.MapToSearchModel(model.Object);

            // Assert
            Assert.Equal(model.Object.EpisodeId, searchModel.EpisodeId);
            Assert.Equal(model.Object.Episode?.CustomKey, searchModel.EpisodeCustomKey);
            Assert.Equal(model.Object.Episode?.ApiDetailUrl, searchModel.EpisodeApiDetailUrl);
            Assert.Equal(model.Object.Episode?.SiteDetailUrl, searchModel.EpisodeSiteDetailUrl);
            Assert.Equal(model.Object.Episode?.Name, searchModel.EpisodeName);
            Assert.Equal(model.Object.Episode?.ShortDescription, searchModel.EpisodeShortDescription);
            Assert.Equal(model.Object.Episode?.Description, searchModel.EpisodeDescription);
            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);
        }