public void Verify_Get_ByKey_Should_ReturnTheCorrectStoryArcAlias()
        {
            // Arrange
            Mock <IDbSet <StoryArcAlias> > mockSetStoryArcAliases;
            var mockContext = StoryArcAliasesMockingSetup.DoMockingSetupForContext(true, out mockSetStoryArcAliases);
            var repository  = new StoryArcAliasesRepository(mockContext.Object);
            // Act
            var storyArcAliases = repository.Get("KING-STEPHEN");

            // Assert
            Assert.Equal("/TEST/KING-STEPHEN", storyArcAliases.ApiDetailUrl);
        }
        public void Verify_Deactivate_Should_SetTheActivePropertyToFalseOnTheEntity()
        {
            // Arrange
            Mock <IDbSet <StoryArcAlias> > mockSetStoryArcAliases;
            var mockContext     = StoryArcAliasesMockingSetup.DoMockingSetupForContext(true, out mockSetStoryArcAliases);
            var repository      = new StoryArcAliasesRepository(mockContext.Object);
            var storyArcAliases = repository.Get(1);

            // Act
            repository.Deactivate(storyArcAliases);
            // Assert
            Assert.Equal(false, storyArcAliases.Active);
        }
        public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
        {
            // Arrange
            Mock <IDbSet <StoryArcAlias> > mockSetStoryArcAliases;
            var mockContext     = StoryArcAliasesMockingSetup.DoMockingSetupForContext(true, out mockSetStoryArcAliases);
            var repository      = new StoryArcAliasesRepository(mockContext.Object);
            var storyArcAliases = repository.Get(1);

            // Act
            repository.Remove(storyArcAliases);
            // Assert
            mockSetStoryArcAliases.Verify(x => x.Remove((StoryArcAlias)storyArcAliases), Times.Once);
        }
        public void Verify_Update_Should_SetTheEntityStateToModified()
        {
            // Arrange
            Mock <IDbSet <StoryArcAlias> > mockSetStoryArcAliases;
            var mockContext     = StoryArcAliasesMockingSetup.DoMockingSetupForContext(true, out mockSetStoryArcAliases);
            var repository      = new StoryArcAliasesRepository(mockContext.Object);
            var storyArcAliases = repository.Get(1);

            storyArcAliases.ApiDetailUrl = "/TEST";
            // Act
            repository.Update(storyArcAliases);
            // Assert
            mockContext.Verify(x => x.SetModified(It.IsAny <object>()), Times.Once);
        }