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

            mockMapper.Setup(x => x.MapToModelListing(It.IsAny <IGender>(), It.IsAny <int>()));
            var mockEntity = GendersMockingSetup.DoMockingSetupForGender(1);

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

            mockMapper.Setup(x => x.AreEqual(It.IsAny <IGenderModel>(), It.IsAny <IGender>()));
            GenderMapperExtensions.OverrideMapper(mockMapper.Object);
            var mockModel  = GendersMockingSetup.DoMockingSetupForGenderModel(1);
            var mockEntity = GendersMockingSetup.DoMockingSetupForGender(1);

            // Act
            mockModel.Object.AreEqual(mockEntity.Object);
            // Assert
            mockMapper.Verify(x => x.AreEqual(It.IsAny <IGenderModel>(), It.IsAny <IGender>()), 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);
        }