public void Verify_AreEqual_WithDifferentObjects_ReturnsFalse()
        {
            // Arrange
            var mapper = new EpisodeObjectFirstAppearanceMapper();
            var model  = EpisodeObjectFirstAppearancesMockingSetup.DoMockingSetupForEpisodeObjectFirstAppearanceModel(1);
            var entity = EpisodeObjectFirstAppearancesMockingSetup.DoMockingSetupForEpisodeObjectFirstAppearance(2);
            // Act
            var result = mapper.AreEqual(model.Object, entity.Object);

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

            mockMapper.Setup(x => x.MapToEntity(It.IsAny <IEpisodeObjectFirstAppearanceModel>(), It.IsAny <int>()));
            var mockModel = EpisodeObjectFirstAppearancesMockingSetup.DoMockingSetupForEpisodeObjectFirstAppearanceModel(1);

            EpisodeObjectFirstAppearanceMapperExtensions.OverrideMapper(mockMapper.Object);
            // Act
            mockModel.Object.MapToEntity();
            // Assert
            mockMapper.Verify(x => x.MapToEntity(It.IsAny <IEpisodeObjectFirstAppearanceModel>(), It.IsAny <int>()), Times.Once);
        }
        public void Verify_MapToModelLite_AssignsLiteOnlyEpisodeObjectFirstAppearanceProperties()
        {
            // Arrange
            var mapper = new EpisodeObjectFirstAppearanceMapper();
            var entity = EpisodeObjectFirstAppearancesMockingSetup.DoMockingSetupForEpisodeObjectFirstAppearance();
            // Act
            var model = mapper.MapToModelLite(entity.Object);

            // Assert
            // <None>
            // Related Objects
            Assert.Equal(entity.Object.EpisodeId, model.EpisodeId);
            Assert.Equal(entity.Object.ObjectId, model.ObjectId);
        }
        public void Verify_MapToEntity_AssignsEpisodeObjectFirstAppearanceProperties()
        {
            // Arrange
            var mapper = new EpisodeObjectFirstAppearanceMapper();
            var model  = EpisodeObjectFirstAppearancesMockingSetup.DoMockingSetupForEpisodeObjectFirstAppearanceModel();
            // Act
            var entity = mapper.MapToEntity(model.Object);

            // Assert
            // <None>
            // Related Objects
            Assert.Equal(model.Object.EpisodeId, entity.EpisodeId);
            Assert.Equal(model.Object.ObjectId, entity.ObjectId);
            // Associated Objects
            // <None>
        }
        public void Verify_MapToSearchModel_AssignsEpisodeObjectFirstAppearanceSearchProperties()
        {
            // Arrange
            var mapper = new EpisodeObjectFirstAppearanceMapper();
            var model  = EpisodeObjectFirstAppearancesMockingSetup.DoMockingSetupForEpisodeObjectFirstAppearanceModel();
            // 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.ObjectId, searchModel.ObjectId);
            Assert.Equal(model.Object.Object?.CustomKey, searchModel.ObjectCustomKey);
            Assert.Equal(model.Object.Object?.ApiDetailUrl, searchModel.ObjectApiDetailUrl);
            Assert.Equal(model.Object.Object?.SiteDetailUrl, searchModel.ObjectSiteDetailUrl);
            Assert.Equal(model.Object.Object?.Name, searchModel.ObjectName);
            Assert.Equal(model.Object.Object?.ShortDescription, searchModel.ObjectShortDescription);
            Assert.Equal(model.Object.Object?.Description, searchModel.ObjectDescription);
        }