public void Verify_AreEqual_WithDifferentObjects_ReturnsFalse()
        {
            // Arrange
            var mapper = new PowerAliasMapper();
            var model  = PowerAliasesMockingSetup.DoMockingSetupForPowerAliasModel(1);
            var entity = PowerAliasesMockingSetup.DoMockingSetupForPowerAlias(2);
            // Act
            var result = mapper.AreEqual(model.Object, entity.Object);

            // Assert
            Assert.False(result);
        }
        public void Verify_MapToEntityExtension_CallsMapToEntity()
        {
            // Arrange
            var mockMapper = new Mock <PowerAliasMapper>();

            mockMapper.Setup(x => x.MapToEntity(It.IsAny <IPowerAliasModel>(), It.IsAny <int>()));
            var mockModel = PowerAliasesMockingSetup.DoMockingSetupForPowerAliasModel(1);

            PowerAliasMapperExtensions.OverrideMapper(mockMapper.Object);
            // Act
            mockModel.Object.MapToEntity();
            // Assert
            mockMapper.Verify(x => x.MapToEntity(It.IsAny <IPowerAliasModel>(), It.IsAny <int>()), Times.Once);
        }
        public void Verify_MapToEntity_AssignsPowerAliasProperties()
        {
            // Arrange
            var mapper = new PowerAliasMapper();
            var model  = PowerAliasesMockingSetup.DoMockingSetupForPowerAliasModel();
            // Act
            var entity = mapper.MapToEntity(model.Object);

            // Assert
            // <None>
            // Related Objects
            Assert.Equal(model.Object.PowerId, entity.PowerId);
            // Associated Objects
            // <None>
        }
        public void Verify_MapToSearchModel_AssignsPowerAliasSearchProperties()
        {
            // Arrange
            var mapper = new PowerAliasMapper();
            var model  = PowerAliasesMockingSetup.DoMockingSetupForPowerAliasModel();
            // Act
            var searchModel = mapper.MapToSearchModel(model.Object);

            // Assert
            Assert.Equal(model.Object.PowerId, searchModel.PowerId);
            Assert.Equal(model.Object.Power?.CustomKey, searchModel.PowerCustomKey);
            Assert.Equal(model.Object.Power?.ApiDetailUrl, searchModel.PowerApiDetailUrl);
            Assert.Equal(model.Object.Power?.SiteDetailUrl, searchModel.PowerSiteDetailUrl);
            Assert.Equal(model.Object.Power?.Name, searchModel.PowerName);
            Assert.Equal(model.Object.Power?.ShortDescription, searchModel.PowerShortDescription);
            Assert.Equal(model.Object.Power?.Description, searchModel.PowerDescription);
        }