public void Verify_Get_ByKey_Should_ReturnTheCorrectEpisodeStoryArc()
        {
            // Arrange
            Mock <IDbSet <EpisodeStoryArc> > mockSetEpisodeStoryArcs;
            var mockContext = EpisodeStoryArcsMockingSetup.DoMockingSetupForContext(true, out mockSetEpisodeStoryArcs);
            var repository  = new EpisodeStoryArcsRepository(mockContext.Object);
            // Act
            var episodeStoryArcs = repository.Get("KING-STEPHEN");

            // Assert
            Assert.Equal("/TEST/KING-STEPHEN", episodeStoryArcs.ApiDetailUrl);
        }
 public void Verify_Deactivate_Should_SetTheActivePropertyToFalseOnTheEntity()
 {
     // Arrange
     Mock<IDbSet<EpisodeStoryArc>> mockSetEpisodeStoryArcs;
     var mockContext = EpisodeStoryArcsMockingSetup.DoMockingSetupForContext(true, out mockSetEpisodeStoryArcs);
     var repository = new EpisodeStoryArcsRepository(mockContext.Object);
     var episodeStoryArcs = repository.Get(1);
     // Act
     repository.Deactivate(episodeStoryArcs);
     // Assert
     Assert.Equal(false, episodeStoryArcs.Active);
 }
        public void Verify_Deactivate_Should_SetTheActivePropertyToFalseOnTheEntity()
        {
            // Arrange
            Mock <IDbSet <EpisodeStoryArc> > mockSetEpisodeStoryArcs;
            var mockContext      = EpisodeStoryArcsMockingSetup.DoMockingSetupForContext(true, out mockSetEpisodeStoryArcs);
            var repository       = new EpisodeStoryArcsRepository(mockContext.Object);
            var episodeStoryArcs = repository.Get(1);

            // Act
            repository.Deactivate(episodeStoryArcs);
            // Assert
            Assert.Equal(false, episodeStoryArcs.Active);
        }
        public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
        {
            // Arrange
            Mock <IDbSet <EpisodeStoryArc> > mockSetEpisodeStoryArcs;
            var mockContext      = EpisodeStoryArcsMockingSetup.DoMockingSetupForContext(true, out mockSetEpisodeStoryArcs);
            var repository       = new EpisodeStoryArcsRepository(mockContext.Object);
            var episodeStoryArcs = repository.Get(1);

            // Act
            repository.Remove(episodeStoryArcs);
            // Assert
            mockSetEpisodeStoryArcs.Verify(x => x.Remove((EpisodeStoryArc)episodeStoryArcs), Times.Once);
        }
        public void Verify_Update_Should_SetTheEntityStateToModified()
        {
            // Arrange
            Mock <IDbSet <EpisodeStoryArc> > mockSetEpisodeStoryArcs;
            var mockContext      = EpisodeStoryArcsMockingSetup.DoMockingSetupForContext(true, out mockSetEpisodeStoryArcs);
            var repository       = new EpisodeStoryArcsRepository(mockContext.Object);
            var episodeStoryArcs = repository.Get(1);

            episodeStoryArcs.ApiDetailUrl = "/TEST";
            // Act
            repository.Update(episodeStoryArcs);
            // Assert
            mockContext.Verify(x => x.SetModified(It.IsAny <object>()), Times.Once);
        }
 public void Verify_Get_ByID_Should_ReturnTheCorrectEpisodeStoryArc()
 {
     // Arrange
     Mock<IDbSet<EpisodeStoryArc>> mockSetEpisodeStoryArcs;
     var mockContext = EpisodeStoryArcsMockingSetup.DoMockingSetupForContext(true, out mockSetEpisodeStoryArcs);
     var repository = new EpisodeStoryArcsRepository(mockContext.Object);
     // Act
     var episodeStoryArcs = repository.Get(1);
     // Assert
                 Assert.Equal("/TEST/KING-STEPHEN", episodeStoryArcs.ApiDetailUrl);
 }
 public void Verify_Update_Should_SetTheEntityStateToModified()
 {
     // Arrange
     Mock<IDbSet<EpisodeStoryArc>> mockSetEpisodeStoryArcs;
     var mockContext = EpisodeStoryArcsMockingSetup.DoMockingSetupForContext(true, out mockSetEpisodeStoryArcs);
     var repository = new EpisodeStoryArcsRepository(mockContext.Object);
     var episodeStoryArcs = repository.Get(1);
     episodeStoryArcs.ApiDetailUrl = "/TEST";
     // Act
     repository.Update(episodeStoryArcs);
     // Assert
     mockContext.Verify(x => x.SetModified(It.IsAny<object>()), Times.Once);
 }
 public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
 {
     // Arrange
     Mock<IDbSet<EpisodeStoryArc>> mockSetEpisodeStoryArcs;
     var mockContext = EpisodeStoryArcsMockingSetup.DoMockingSetupForContext(true, out mockSetEpisodeStoryArcs);
     var repository = new EpisodeStoryArcsRepository(mockContext.Object);
     var episodeStoryArcs = repository.Get(1);
     // Act
     repository.Remove(episodeStoryArcs);
     // Assert
     mockSetEpisodeStoryArcs.Verify(x => x.Remove((EpisodeStoryArc)episodeStoryArcs), Times.Once);
 }