public void Verify_AreEqual_WithDifferentObjects_ReturnsFalse()
        {
            // Arrange
            var mapper = new MovieTeamMapper();
            var model  = MovieTeamsMockingSetup.DoMockingSetupForMovieTeamModel(1);
            var entity = MovieTeamsMockingSetup.DoMockingSetupForMovieTeam(2);
            // Act
            var result = mapper.AreEqual(model.Object, entity.Object);

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

            mockMapper.Setup(x => x.MapToEntity(It.IsAny <IMovieTeamModel>(), It.IsAny <int>()));
            var mockModel = MovieTeamsMockingSetup.DoMockingSetupForMovieTeamModel(1);

            MovieTeamMapperExtensions.OverrideMapper(mockMapper.Object);
            // Act
            mockModel.Object.MapToEntity();
            // Assert
            mockMapper.Verify(x => x.MapToEntity(It.IsAny <IMovieTeamModel>(), It.IsAny <int>()), Times.Once);
        }
        public void Verify_MapToModelLite_AssignsLiteOnlyMovieTeamProperties()
        {
            // Arrange
            var mapper = new MovieTeamMapper();
            var entity = MovieTeamsMockingSetup.DoMockingSetupForMovieTeam();
            // Act
            var model = mapper.MapToModelLite(entity.Object);

            // Assert
            // <None>
            // Related Objects
            Assert.Equal(entity.Object.MovieId, model.MovieId);
            Assert.Equal(entity.Object.TeamId, model.TeamId);
        }
        public void Verify_MapToEntity_AssignsMovieTeamProperties()
        {
            // Arrange
            var mapper = new MovieTeamMapper();
            var model  = MovieTeamsMockingSetup.DoMockingSetupForMovieTeamModel();
            // Act
            var entity = mapper.MapToEntity(model.Object);

            // Assert
            // <None>
            // Related Objects
            Assert.Equal(model.Object.MovieId, entity.MovieId);
            Assert.Equal(model.Object.TeamId, entity.TeamId);
            // Associated Objects
            // <None>
        }
        public void Verify_MapToSearchModel_AssignsMovieTeamSearchProperties()
        {
            // Arrange
            var mapper = new MovieTeamMapper();
            var model  = MovieTeamsMockingSetup.DoMockingSetupForMovieTeamModel();
            // 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.TeamId, searchModel.TeamId);
            Assert.Equal(model.Object.Team?.CustomKey, searchModel.TeamCustomKey);
            Assert.Equal(model.Object.Team?.ApiDetailUrl, searchModel.TeamApiDetailUrl);
            Assert.Equal(model.Object.Team?.SiteDetailUrl, searchModel.TeamSiteDetailUrl);
            Assert.Equal(model.Object.Team?.Name, searchModel.TeamName);
            Assert.Equal(model.Object.Team?.ShortDescription, searchModel.TeamShortDescription);
            Assert.Equal(model.Object.Team?.Description, searchModel.TeamDescription);
        }