public void Verify_Get_ByKey_Should_ReturnTheCorrectStoryArcIssue()
        {
            // Arrange
            Mock <IDbSet <StoryArcIssue> > mockSetStoryArcIssues;
            var mockContext = StoryArcIssuesMockingSetup.DoMockingSetupForContext(true, out mockSetStoryArcIssues);
            var repository  = new StoryArcIssuesRepository(mockContext.Object);
            // Act
            var storyArcIssues = repository.Get("KING-STEPHEN");

            // Assert
            Assert.Equal("/TEST/KING-STEPHEN", storyArcIssues.ApiDetailUrl);
        }
 public void Verify_Deactivate_Should_SetTheActivePropertyToFalseOnTheEntity()
 {
     // Arrange
     Mock<IDbSet<StoryArcIssue>> mockSetStoryArcIssues;
     var mockContext = StoryArcIssuesMockingSetup.DoMockingSetupForContext(true, out mockSetStoryArcIssues);
     var repository = new StoryArcIssuesRepository(mockContext.Object);
     var storyArcIssues = repository.Get(1);
     // Act
     repository.Deactivate(storyArcIssues);
     // Assert
     Assert.Equal(false, storyArcIssues.Active);
 }
        public void Verify_Deactivate_Should_SetTheActivePropertyToFalseOnTheEntity()
        {
            // Arrange
            Mock <IDbSet <StoryArcIssue> > mockSetStoryArcIssues;
            var mockContext    = StoryArcIssuesMockingSetup.DoMockingSetupForContext(true, out mockSetStoryArcIssues);
            var repository     = new StoryArcIssuesRepository(mockContext.Object);
            var storyArcIssues = repository.Get(1);

            // Act
            repository.Deactivate(storyArcIssues);
            // Assert
            Assert.Equal(false, storyArcIssues.Active);
        }
        public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
        {
            // Arrange
            Mock <IDbSet <StoryArcIssue> > mockSetStoryArcIssues;
            var mockContext    = StoryArcIssuesMockingSetup.DoMockingSetupForContext(true, out mockSetStoryArcIssues);
            var repository     = new StoryArcIssuesRepository(mockContext.Object);
            var storyArcIssues = repository.Get(1);

            // Act
            repository.Remove(storyArcIssues);
            // Assert
            mockSetStoryArcIssues.Verify(x => x.Remove((StoryArcIssue)storyArcIssues), Times.Once);
        }
        public void Verify_Update_Should_SetTheEntityStateToModified()
        {
            // Arrange
            Mock <IDbSet <StoryArcIssue> > mockSetStoryArcIssues;
            var mockContext    = StoryArcIssuesMockingSetup.DoMockingSetupForContext(true, out mockSetStoryArcIssues);
            var repository     = new StoryArcIssuesRepository(mockContext.Object);
            var storyArcIssues = repository.Get(1);

            storyArcIssues.ApiDetailUrl = "/TEST";
            // Act
            repository.Update(storyArcIssues);
            // Assert
            mockContext.Verify(x => x.SetModified(It.IsAny <object>()), Times.Once);
        }
 public void Verify_Get_ByID_Should_ReturnTheCorrectStoryArcIssue()
 {
     // Arrange
     Mock<IDbSet<StoryArcIssue>> mockSetStoryArcIssues;
     var mockContext = StoryArcIssuesMockingSetup.DoMockingSetupForContext(true, out mockSetStoryArcIssues);
     var repository = new StoryArcIssuesRepository(mockContext.Object);
     // Act
     var storyArcIssues = repository.Get(1);
     // Assert
                 Assert.Equal("/TEST/KING-STEPHEN", storyArcIssues.ApiDetailUrl);
 }
 public void Verify_Update_Should_SetTheEntityStateToModified()
 {
     // Arrange
     Mock<IDbSet<StoryArcIssue>> mockSetStoryArcIssues;
     var mockContext = StoryArcIssuesMockingSetup.DoMockingSetupForContext(true, out mockSetStoryArcIssues);
     var repository = new StoryArcIssuesRepository(mockContext.Object);
     var storyArcIssues = repository.Get(1);
     storyArcIssues.ApiDetailUrl = "/TEST";
     // Act
     repository.Update(storyArcIssues);
     // Assert
     mockContext.Verify(x => x.SetModified(It.IsAny<object>()), Times.Once);
 }
 public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
 {
     // Arrange
     Mock<IDbSet<StoryArcIssue>> mockSetStoryArcIssues;
     var mockContext = StoryArcIssuesMockingSetup.DoMockingSetupForContext(true, out mockSetStoryArcIssues);
     var repository = new StoryArcIssuesRepository(mockContext.Object);
     var storyArcIssues = repository.Get(1);
     // Act
     repository.Remove(storyArcIssues);
     // Assert
     mockSetStoryArcIssues.Verify(x => x.Remove((StoryArcIssue)storyArcIssues), Times.Once);
 }