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_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_MapToModelListingExtension_CallsMapToModel()
        {
            // Arrange
            var mockMapper = new Mock <MovieTeamMapper>();

            mockMapper.Setup(x => x.MapToModelListing(It.IsAny <IMovieTeam>(), It.IsAny <int>()));
            var mockEntity = MovieTeamsMockingSetup.DoMockingSetupForMovieTeam(1);

            MovieTeamMapperExtensions.OverrideMapper(mockMapper.Object);
            // Act
            mockEntity.Object.MapToModelListing();
            // Assert
            mockMapper.Verify(x => x.MapToModelListing(It.IsAny <IMovieTeam>(), It.IsAny <int>()), Times.Once);
        }
        public void Verify_AreEqualExtension_CallsAreEqual()
        {
            // Arrange
            var mockMapper = new Mock <MovieTeamMapper>();

            mockMapper.Setup(x => x.AreEqual(It.IsAny <IMovieTeamModel>(), It.IsAny <IMovieTeam>()));
            MovieTeamMapperExtensions.OverrideMapper(mockMapper.Object);
            var mockModel  = MovieTeamsMockingSetup.DoMockingSetupForMovieTeamModel(1);
            var mockEntity = MovieTeamsMockingSetup.DoMockingSetupForMovieTeam(1);

            // Act
            mockModel.Object.AreEqual(mockEntity.Object);
            // Assert
            mockMapper.Verify(x => x.AreEqual(It.IsAny <IMovieTeamModel>(), It.IsAny <IMovieTeam>()), Times.Once);
        }