public void Verify_AreEqual_WithDifferentObjects_ReturnsFalse()
        {
            // Arrange
            var mapper = new OriginProfileMapper();
            var model  = OriginProfilesMockingSetup.DoMockingSetupForOriginProfileModel(1);
            var entity = OriginProfilesMockingSetup.DoMockingSetupForOriginProfile(2);
            // Act
            var result = mapper.AreEqual(model.Object, entity.Object);

            // Assert
            Assert.False(result);
        }
        public void Verify_MapToModelLite_AssignsLiteOnlyOriginProfileProperties()
        {
            // Arrange
            var mapper = new OriginProfileMapper();
            var entity = OriginProfilesMockingSetup.DoMockingSetupForOriginProfile();
            // Act
            var model = mapper.MapToModelLite(entity.Object);

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

            mockMapper.Setup(x => x.MapToModelListing(It.IsAny <IOriginProfile>(), It.IsAny <int>()));
            var mockEntity = OriginProfilesMockingSetup.DoMockingSetupForOriginProfile(1);

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

            mockMapper.Setup(x => x.AreEqual(It.IsAny <IOriginProfileModel>(), It.IsAny <IOriginProfile>()));
            OriginProfileMapperExtensions.OverrideMapper(mockMapper.Object);
            var mockModel  = OriginProfilesMockingSetup.DoMockingSetupForOriginProfileModel(1);
            var mockEntity = OriginProfilesMockingSetup.DoMockingSetupForOriginProfile(1);

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