public void Verify_AreEqual_WithDifferentObjects_ReturnsFalse()
        {
            // Arrange
            var mapper = new VolumeTeamMapper();
            var model  = VolumeTeamsMockingSetup.DoMockingSetupForVolumeTeamModel(1);
            var entity = VolumeTeamsMockingSetup.DoMockingSetupForVolumeTeam(2);
            // Act
            var result = mapper.AreEqual(model.Object, entity.Object);

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

            mockMapper.Setup(x => x.MapToEntity(It.IsAny <IVolumeTeamModel>(), It.IsAny <int>()));
            var mockModel = VolumeTeamsMockingSetup.DoMockingSetupForVolumeTeamModel(1);

            VolumeTeamMapperExtensions.OverrideMapper(mockMapper.Object);
            // Act
            mockModel.Object.MapToEntity();
            // Assert
            mockMapper.Verify(x => x.MapToEntity(It.IsAny <IVolumeTeamModel>(), It.IsAny <int>()), Times.Once);
        }
        public void Verify_MapToModelLite_AssignsLiteOnlyVolumeTeamProperties()
        {
            // Arrange
            var mapper = new VolumeTeamMapper();
            var entity = VolumeTeamsMockingSetup.DoMockingSetupForVolumeTeam();
            // Act
            var model = mapper.MapToModelLite(entity.Object);

            // Assert
            // <None>
            // Related Objects
            Assert.Equal(entity.Object.VolumeId, model.VolumeId);
            Assert.Equal(entity.Object.TeamId, model.TeamId);
        }
        public void Verify_MapToEntity_AssignsVolumeTeamProperties()
        {
            // Arrange
            var mapper = new VolumeTeamMapper();
            var model  = VolumeTeamsMockingSetup.DoMockingSetupForVolumeTeamModel();
            // Act
            var entity = mapper.MapToEntity(model.Object);

            // Assert
            // <None>
            // Related Objects
            Assert.Equal(model.Object.VolumeId, entity.VolumeId);
            Assert.Equal(model.Object.TeamId, entity.TeamId);
            // Associated Objects
            // <None>
        }
        public void Verify_MapToSearchModel_AssignsVolumeTeamSearchProperties()
        {
            // Arrange
            var mapper = new VolumeTeamMapper();
            var model  = VolumeTeamsMockingSetup.DoMockingSetupForVolumeTeamModel();
            // Act
            var searchModel = mapper.MapToSearchModel(model.Object);

            // Assert
            Assert.Equal(model.Object.VolumeId, searchModel.VolumeId);
            Assert.Equal(model.Object.Volume?.CustomKey, searchModel.VolumeCustomKey);
            Assert.Equal(model.Object.Volume?.ApiDetailUrl, searchModel.VolumeApiDetailUrl);
            Assert.Equal(model.Object.Volume?.SiteDetailUrl, searchModel.VolumeSiteDetailUrl);
            Assert.Equal(model.Object.Volume?.Name, searchModel.VolumeName);
            Assert.Equal(model.Object.Volume?.ShortDescription, searchModel.VolumeShortDescription);
            Assert.Equal(model.Object.Volume?.Description, searchModel.VolumeDescription);
            Assert.Equal(model.Object.TeamId, searchModel.TeamId);
            Assert.Equal(model.Object.Team?.CustomKey, searchModel.TeamCustomKey);
            Assert.Equal(model.Object.Team?.ApiDetailUrl, searchModel.TeamApiDetailUrl);
            Assert.Equal(model.Object.Team?.SiteDetailUrl, searchModel.TeamSiteDetailUrl);
            Assert.Equal(model.Object.Team?.Name, searchModel.TeamName);
            Assert.Equal(model.Object.Team?.ShortDescription, searchModel.TeamShortDescription);
            Assert.Equal(model.Object.Team?.Description, searchModel.TeamDescription);
        }