public void Verify_Get_ByKey_Should_ReturnTheCorrectEpisodeCharacterFirstAppearance()
        {
            // Arrange
            Mock <IDbSet <EpisodeCharacterFirstAppearance> > mockSetEpisodeCharacterFirstAppearances;
            var mockContext = EpisodeCharacterFirstAppearancesMockingSetup.DoMockingSetupForContext(true, out mockSetEpisodeCharacterFirstAppearances);
            var repository  = new EpisodeCharacterFirstAppearancesRepository(mockContext.Object);
            // Act
            var episodeCharacterFirstAppearances = repository.Get("KING-STEPHEN");

            // Assert
            Assert.Equal("/TEST/KING-STEPHEN", episodeCharacterFirstAppearances.ApiDetailUrl);
        }
        public void Verify_Deactivate_Should_SetTheActivePropertyToFalseOnTheEntity()
        {
            // Arrange
            Mock <IDbSet <EpisodeCharacterFirstAppearance> > mockSetEpisodeCharacterFirstAppearances;
            var mockContext = EpisodeCharacterFirstAppearancesMockingSetup.DoMockingSetupForContext(true, out mockSetEpisodeCharacterFirstAppearances);
            var repository  = new EpisodeCharacterFirstAppearancesRepository(mockContext.Object);
            var episodeCharacterFirstAppearances = repository.Get(1);

            // Act
            repository.Deactivate(episodeCharacterFirstAppearances);
            // Assert
            Assert.Equal(false, episodeCharacterFirstAppearances.Active);
        }
        public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
        {
            // Arrange
            Mock <IDbSet <EpisodeCharacterFirstAppearance> > mockSetEpisodeCharacterFirstAppearances;
            var mockContext = EpisodeCharacterFirstAppearancesMockingSetup.DoMockingSetupForContext(true, out mockSetEpisodeCharacterFirstAppearances);
            var repository  = new EpisodeCharacterFirstAppearancesRepository(mockContext.Object);
            var episodeCharacterFirstAppearances = repository.Get(1);

            // Act
            repository.Remove(episodeCharacterFirstAppearances);
            // Assert
            mockSetEpisodeCharacterFirstAppearances.Verify(x => x.Remove((EpisodeCharacterFirstAppearance)episodeCharacterFirstAppearances), Times.Once);
        }
        public void Verify_Update_Should_SetTheEntityStateToModified()
        {
            // Arrange
            Mock <IDbSet <EpisodeCharacterFirstAppearance> > mockSetEpisodeCharacterFirstAppearances;
            var mockContext = EpisodeCharacterFirstAppearancesMockingSetup.DoMockingSetupForContext(true, out mockSetEpisodeCharacterFirstAppearances);
            var repository  = new EpisodeCharacterFirstAppearancesRepository(mockContext.Object);
            var episodeCharacterFirstAppearances = repository.Get(1);

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