public void Verify_AreEqual_WithDifferentObjects_ReturnsFalse()
        {
            // Arrange
            var mapper = new ObjectMovieMapper();
            var model  = ObjectMoviesMockingSetup.DoMockingSetupForObjectMovieModel(1);
            var entity = ObjectMoviesMockingSetup.DoMockingSetupForObjectMovie(2);
            // Act
            var result = mapper.AreEqual(model.Object, entity.Object);

            // Assert
            Assert.False(result);
        }
        public void Verify_MapToModelLite_AssignsLiteOnlyObjectMovieProperties()
        {
            // Arrange
            var mapper = new ObjectMovieMapper();
            var entity = ObjectMoviesMockingSetup.DoMockingSetupForObjectMovie();
            // Act
            var model = mapper.MapToModelLite(entity.Object);

            // Assert
            // <None>
            // Related Objects
            Assert.Equal(entity.Object.ObjectId, model.ObjectId);
            Assert.Equal(entity.Object.MovieId, model.MovieId);
        }
        public void Verify_MapToModelListingExtension_CallsMapToModel()
        {
            // Arrange
            var mockMapper = new Mock <ObjectMovieMapper>();

            mockMapper.Setup(x => x.MapToModelListing(It.IsAny <IObjectMovie>(), It.IsAny <int>()));
            var mockEntity = ObjectMoviesMockingSetup.DoMockingSetupForObjectMovie(1);

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

            mockMapper.Setup(x => x.AreEqual(It.IsAny <IObjectMovieModel>(), It.IsAny <IObjectMovie>()));
            ObjectMovieMapperExtensions.OverrideMapper(mockMapper.Object);
            var mockModel  = ObjectMoviesMockingSetup.DoMockingSetupForObjectMovieModel(1);
            var mockEntity = ObjectMoviesMockingSetup.DoMockingSetupForObjectMovie(1);

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