public void Verify_AreEqual_WithDifferentObjects_ReturnsFalse()
        {
            // Arrange
            var mapper = new ConceptAppearedInIssueMapper();
            var model  = ConceptAppearedInIssuesMockingSetup.DoMockingSetupForConceptAppearedInIssueModel(1);
            var entity = ConceptAppearedInIssuesMockingSetup.DoMockingSetupForConceptAppearedInIssue(2);
            // Act
            var result = mapper.AreEqual(model.Object, entity.Object);

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

            mockMapper.Setup(x => x.MapToEntity(It.IsAny <IConceptAppearedInIssueModel>(), It.IsAny <int>()));
            var mockModel = ConceptAppearedInIssuesMockingSetup.DoMockingSetupForConceptAppearedInIssueModel(1);

            ConceptAppearedInIssueMapperExtensions.OverrideMapper(mockMapper.Object);
            // Act
            mockModel.Object.MapToEntity();
            // Assert
            mockMapper.Verify(x => x.MapToEntity(It.IsAny <IConceptAppearedInIssueModel>(), It.IsAny <int>()), Times.Once);
        }
        public void Verify_MapToModelLite_AssignsLiteOnlyConceptAppearedInIssueProperties()
        {
            // Arrange
            var mapper = new ConceptAppearedInIssueMapper();
            var entity = ConceptAppearedInIssuesMockingSetup.DoMockingSetupForConceptAppearedInIssue();
            // Act
            var model = mapper.MapToModelLite(entity.Object);

            // Assert
            // <None>
            // Related Objects
            Assert.Equal(entity.Object.ConceptId, model.ConceptId);
            Assert.Equal(entity.Object.AppearedInIssueId, model.AppearedInIssueId);
        }
        public void Verify_MapToEntity_AssignsConceptAppearedInIssueProperties()
        {
            // Arrange
            var mapper = new ConceptAppearedInIssueMapper();
            var model  = ConceptAppearedInIssuesMockingSetup.DoMockingSetupForConceptAppearedInIssueModel();
            // Act
            var entity = mapper.MapToEntity(model.Object);

            // Assert
            // <None>
            // Related Objects
            Assert.Equal(model.Object.ConceptId, entity.ConceptId);
            Assert.Equal(model.Object.AppearedInIssueId, entity.AppearedInIssueId);
            // Associated Objects
            // <None>
        }
        public void Verify_MapToSearchModel_AssignsConceptAppearedInIssueSearchProperties()
        {
            // Arrange
            var mapper = new ConceptAppearedInIssueMapper();
            var model  = ConceptAppearedInIssuesMockingSetup.DoMockingSetupForConceptAppearedInIssueModel();
            // Act
            var searchModel = mapper.MapToSearchModel(model.Object);

            // Assert
            Assert.Equal(model.Object.ConceptId, searchModel.ConceptId);
            Assert.Equal(model.Object.Concept?.CustomKey, searchModel.ConceptCustomKey);
            Assert.Equal(model.Object.Concept?.ApiDetailUrl, searchModel.ConceptApiDetailUrl);
            Assert.Equal(model.Object.Concept?.SiteDetailUrl, searchModel.ConceptSiteDetailUrl);
            Assert.Equal(model.Object.Concept?.Name, searchModel.ConceptName);
            Assert.Equal(model.Object.Concept?.ShortDescription, searchModel.ConceptShortDescription);
            Assert.Equal(model.Object.Concept?.Description, searchModel.ConceptDescription);
            Assert.Equal(model.Object.AppearedInIssueId, searchModel.AppearedInIssueId);
            Assert.Equal(model.Object.AppearedInIssue?.CustomKey, searchModel.AppearedInIssueCustomKey);
            Assert.Equal(model.Object.AppearedInIssue?.ApiDetailUrl, searchModel.AppearedInIssueApiDetailUrl);
            Assert.Equal(model.Object.AppearedInIssue?.SiteDetailUrl, searchModel.AppearedInIssueSiteDetailUrl);
            Assert.Equal(model.Object.AppearedInIssue?.Name, searchModel.AppearedInIssueName);
            Assert.Equal(model.Object.AppearedInIssue?.ShortDescription, searchModel.AppearedInIssueShortDescription);
            Assert.Equal(model.Object.AppearedInIssue?.Description, searchModel.AppearedInIssueDescription);
        }