public void Verify_AreEqual_WithDifferentObjects_ReturnsFalse()
        {
            // Arrange
            var mapper = new MovieConceptMapper();
            var model  = MovieConceptsMockingSetup.DoMockingSetupForMovieConceptModel(1);
            var entity = MovieConceptsMockingSetup.DoMockingSetupForMovieConcept(2);
            // Act
            var result = mapper.AreEqual(model.Object, entity.Object);

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

            mockMapper.Setup(x => x.MapToEntity(It.IsAny <IMovieConceptModel>(), It.IsAny <int>()));
            var mockModel = MovieConceptsMockingSetup.DoMockingSetupForMovieConceptModel(1);

            MovieConceptMapperExtensions.OverrideMapper(mockMapper.Object);
            // Act
            mockModel.Object.MapToEntity();
            // Assert
            mockMapper.Verify(x => x.MapToEntity(It.IsAny <IMovieConceptModel>(), It.IsAny <int>()), Times.Once);
        }
        public void Verify_MapToModelLite_AssignsLiteOnlyMovieConceptProperties()
        {
            // Arrange
            var mapper = new MovieConceptMapper();
            var entity = MovieConceptsMockingSetup.DoMockingSetupForMovieConcept();
            // Act
            var model = mapper.MapToModelLite(entity.Object);

            // Assert
            // <None>
            // Related Objects
            Assert.Equal(entity.Object.MovieId, model.MovieId);
            Assert.Equal(entity.Object.ConceptId, model.ConceptId);
        }
        public void Verify_MapToEntity_AssignsMovieConceptProperties()
        {
            // Arrange
            var mapper = new MovieConceptMapper();
            var model  = MovieConceptsMockingSetup.DoMockingSetupForMovieConceptModel();
            // Act
            var entity = mapper.MapToEntity(model.Object);

            // Assert
            // <None>
            // Related Objects
            Assert.Equal(model.Object.MovieId, entity.MovieId);
            Assert.Equal(model.Object.ConceptId, entity.ConceptId);
            // Associated Objects
            // <None>
        }
        public void Verify_MapToSearchModel_AssignsMovieConceptSearchProperties()
        {
            // Arrange
            var mapper = new MovieConceptMapper();
            var model  = MovieConceptsMockingSetup.DoMockingSetupForMovieConceptModel();
            // Act
            var searchModel = mapper.MapToSearchModel(model.Object);

            // Assert
            Assert.Equal(model.Object.MovieId, searchModel.MovieId);
            Assert.Equal(model.Object.Movie?.CustomKey, searchModel.MovieCustomKey);
            Assert.Equal(model.Object.Movie?.ApiDetailUrl, searchModel.MovieApiDetailUrl);
            Assert.Equal(model.Object.Movie?.SiteDetailUrl, searchModel.MovieSiteDetailUrl);
            Assert.Equal(model.Object.Movie?.Name, searchModel.MovieName);
            Assert.Equal(model.Object.Movie?.ShortDescription, searchModel.MovieShortDescription);
            Assert.Equal(model.Object.Movie?.Description, searchModel.MovieDescription);
            Assert.Equal(model.Object.ConceptId, searchModel.ConceptId);
            Assert.Equal(model.Object.Concept?.CustomKey, searchModel.ConceptCustomKey);
            Assert.Equal(model.Object.Concept?.ApiDetailUrl, searchModel.ConceptApiDetailUrl);
            Assert.Equal(model.Object.Concept?.SiteDetailUrl, searchModel.ConceptSiteDetailUrl);
            Assert.Equal(model.Object.Concept?.Name, searchModel.ConceptName);
            Assert.Equal(model.Object.Concept?.ShortDescription, searchModel.ConceptShortDescription);
            Assert.Equal(model.Object.Concept?.Description, searchModel.ConceptDescription);
        }