public void Verify_Get_ByKey_Should_ReturnTheCorrectConceptAppearedInIssue()
        {
            // Arrange
            Mock <IDbSet <ConceptAppearedInIssue> > mockSetConceptAppearedInIssues;
            var mockContext = ConceptAppearedInIssuesMockingSetup.DoMockingSetupForContext(true, out mockSetConceptAppearedInIssues);
            var repository  = new ConceptAppearedInIssuesRepository(mockContext.Object);
            // Act
            var conceptAppearedInIssues = repository.Get("KING-STEPHEN");

            // Assert
            Assert.Equal("/TEST/KING-STEPHEN", conceptAppearedInIssues.ApiDetailUrl);
        }
 public void Verify_Deactivate_Should_SetTheActivePropertyToFalseOnTheEntity()
 {
     // Arrange
     Mock<IDbSet<ConceptAppearedInIssue>> mockSetConceptAppearedInIssues;
     var mockContext = ConceptAppearedInIssuesMockingSetup.DoMockingSetupForContext(true, out mockSetConceptAppearedInIssues);
     var repository = new ConceptAppearedInIssuesRepository(mockContext.Object);
     var conceptAppearedInIssues = repository.Get(1);
     // Act
     repository.Deactivate(conceptAppearedInIssues);
     // Assert
     Assert.Equal(false, conceptAppearedInIssues.Active);
 }
        public void Verify_Deactivate_Should_SetTheActivePropertyToFalseOnTheEntity()
        {
            // Arrange
            Mock <IDbSet <ConceptAppearedInIssue> > mockSetConceptAppearedInIssues;
            var mockContext             = ConceptAppearedInIssuesMockingSetup.DoMockingSetupForContext(true, out mockSetConceptAppearedInIssues);
            var repository              = new ConceptAppearedInIssuesRepository(mockContext.Object);
            var conceptAppearedInIssues = repository.Get(1);

            // Act
            repository.Deactivate(conceptAppearedInIssues);
            // Assert
            Assert.Equal(false, conceptAppearedInIssues.Active);
        }
        public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
        {
            // Arrange
            Mock <IDbSet <ConceptAppearedInIssue> > mockSetConceptAppearedInIssues;
            var mockContext             = ConceptAppearedInIssuesMockingSetup.DoMockingSetupForContext(true, out mockSetConceptAppearedInIssues);
            var repository              = new ConceptAppearedInIssuesRepository(mockContext.Object);
            var conceptAppearedInIssues = repository.Get(1);

            // Act
            repository.Remove(conceptAppearedInIssues);
            // Assert
            mockSetConceptAppearedInIssues.Verify(x => x.Remove((ConceptAppearedInIssue)conceptAppearedInIssues), Times.Once);
        }
        public void Verify_Update_Should_SetTheEntityStateToModified()
        {
            // Arrange
            Mock <IDbSet <ConceptAppearedInIssue> > mockSetConceptAppearedInIssues;
            var mockContext             = ConceptAppearedInIssuesMockingSetup.DoMockingSetupForContext(true, out mockSetConceptAppearedInIssues);
            var repository              = new ConceptAppearedInIssuesRepository(mockContext.Object);
            var conceptAppearedInIssues = repository.Get(1);

            conceptAppearedInIssues.ApiDetailUrl = "/TEST";
            // Act
            repository.Update(conceptAppearedInIssues);
            // Assert
            mockContext.Verify(x => x.SetModified(It.IsAny <object>()), Times.Once);
        }
 public void Verify_Get_ByID_Should_ReturnTheCorrectConceptAppearedInIssue()
 {
     // Arrange
     Mock<IDbSet<ConceptAppearedInIssue>> mockSetConceptAppearedInIssues;
     var mockContext = ConceptAppearedInIssuesMockingSetup.DoMockingSetupForContext(true, out mockSetConceptAppearedInIssues);
     var repository = new ConceptAppearedInIssuesRepository(mockContext.Object);
     // Act
     var conceptAppearedInIssues = repository.Get(1);
     // Assert
                 Assert.Equal("/TEST/KING-STEPHEN", conceptAppearedInIssues.ApiDetailUrl);
 }
 public void Verify_Update_Should_SetTheEntityStateToModified()
 {
     // Arrange
     Mock<IDbSet<ConceptAppearedInIssue>> mockSetConceptAppearedInIssues;
     var mockContext = ConceptAppearedInIssuesMockingSetup.DoMockingSetupForContext(true, out mockSetConceptAppearedInIssues);
     var repository = new ConceptAppearedInIssuesRepository(mockContext.Object);
     var conceptAppearedInIssues = repository.Get(1);
     conceptAppearedInIssues.ApiDetailUrl = "/TEST";
     // Act
     repository.Update(conceptAppearedInIssues);
     // Assert
     mockContext.Verify(x => x.SetModified(It.IsAny<object>()), Times.Once);
 }
 public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
 {
     // Arrange
     Mock<IDbSet<ConceptAppearedInIssue>> mockSetConceptAppearedInIssues;
     var mockContext = ConceptAppearedInIssuesMockingSetup.DoMockingSetupForContext(true, out mockSetConceptAppearedInIssues);
     var repository = new ConceptAppearedInIssuesRepository(mockContext.Object);
     var conceptAppearedInIssues = repository.Get(1);
     // Act
     repository.Remove(conceptAppearedInIssues);
     // Assert
     mockSetConceptAppearedInIssues.Verify(x => x.Remove((ConceptAppearedInIssue)conceptAppearedInIssues), Times.Once);
 }