public void Verify_MapToSearchModel_AssignsGenderSearchProperties()
 {
     // Arrange
     var mapper = new GenderMapper();
     var model  = GendersMockingSetup.DoMockingSetupForGenderModel();
     // Act
     var searchModel = mapper.MapToSearchModel(model.Object);
     // Assert
 }
        public void Verify_AreEqual_WithDifferentObjects_ReturnsFalse()
        {
            // Arrange
            var mapper = new GenderMapper();
            var model  = GendersMockingSetup.DoMockingSetupForGenderModel(1);
            var entity = GendersMockingSetup.DoMockingSetupForGender(2);
            // Act
            var result = mapper.AreEqual(model.Object, entity.Object);

            // Assert
            Assert.False(result);
        }
 public void Verify_MapToModelLite_AssignsLiteOnlyGenderProperties()
 {
     // Arrange
     var mapper = new GenderMapper();
     var entity = GendersMockingSetup.DoMockingSetupForGender();
     // Act
     var model = mapper.MapToModelLite(entity.Object);
     // Assert
     // <None>
     // Related Objects
     // <None>
 }
        public void Verify_MapToEntityExtension_CallsMapToEntity()
        {
            // Arrange
            var mockMapper = new Mock <GenderMapper>();

            mockMapper.Setup(x => x.MapToEntity(It.IsAny <IGenderModel>(), It.IsAny <int>()));
            var mockModel = GendersMockingSetup.DoMockingSetupForGenderModel(1);

            GenderMapperExtensions.OverrideMapper(mockMapper.Object);
            // Act
            mockModel.Object.MapToEntity();
            // Assert
            mockMapper.Verify(x => x.MapToEntity(It.IsAny <IGenderModel>(), It.IsAny <int>()), Times.Once);
        }
        public void Verify_MapToModel_AssignsGenderProperties()
        {
            // Arrange
            var mapper = new GenderMapper();
            var entity = GendersMockingSetup.DoMockingSetupForGender();
            // Act
            var model = mapper.MapToModel(entity.Object);

            // Assert
            // <None>
            // Related Objects
            // <None>
            // Associated Objects
            Assert.Equal(entity.Object.Characters?.Count, model.Characters?.Count);
            Assert.Equal(entity.Object.People?.Count, model.People?.Count);
        }
        public void Verify_MapToEntity_AssignsGenderProperties()
        {
            // Arrange
            var mapper = new GenderMapper();
            var model  = GendersMockingSetup.DoMockingSetupForGenderModel();
            // Act
            var entity = mapper.MapToEntity(model.Object);

            // Assert
            // <None>
            // Related Objects
            // <None>
            // Associated Objects
            //Assert.Equal(model.Object.Characters?.Count, entity.Characters?.Count);
            model.VerifyGet(x => x.Characters, Times.Once);
            //Assert.Equal(model.Object.People?.Count, entity.People?.Count);
            model.VerifyGet(x => x.People, Times.Once);
        }