public void Verify_Get_ByKey_Should_ReturnTheCorrectMovieTeam()
        {
            // Arrange
            Mock <IDbSet <MovieTeam> > mockSetMovieTeams;
            var mockContext = MovieTeamsMockingSetup.DoMockingSetupForContext(true, out mockSetMovieTeams);
            var repository  = new MovieTeamsRepository(mockContext.Object);
            // Act
            var movieTeams = repository.Get("KING-STEPHEN");

            // Assert
            Assert.Equal("/TEST/KING-STEPHEN", movieTeams.ApiDetailUrl);
        }
 public void Verify_Deactivate_Should_SetTheActivePropertyToFalseOnTheEntity()
 {
     // Arrange
     Mock<IDbSet<MovieTeam>> mockSetMovieTeams;
     var mockContext = MovieTeamsMockingSetup.DoMockingSetupForContext(true, out mockSetMovieTeams);
     var repository = new MovieTeamsRepository(mockContext.Object);
     var movieTeams = repository.Get(1);
     // Act
     repository.Deactivate(movieTeams);
     // Assert
     Assert.Equal(false, movieTeams.Active);
 }
        public void Verify_Deactivate_Should_SetTheActivePropertyToFalseOnTheEntity()
        {
            // Arrange
            Mock <IDbSet <MovieTeam> > mockSetMovieTeams;
            var mockContext = MovieTeamsMockingSetup.DoMockingSetupForContext(true, out mockSetMovieTeams);
            var repository  = new MovieTeamsRepository(mockContext.Object);
            var movieTeams  = repository.Get(1);

            // Act
            repository.Deactivate(movieTeams);
            // Assert
            Assert.Equal(false, movieTeams.Active);
        }
        public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
        {
            // Arrange
            Mock <IDbSet <MovieTeam> > mockSetMovieTeams;
            var mockContext = MovieTeamsMockingSetup.DoMockingSetupForContext(true, out mockSetMovieTeams);
            var repository  = new MovieTeamsRepository(mockContext.Object);
            var movieTeams  = repository.Get(1);

            // Act
            repository.Remove(movieTeams);
            // Assert
            mockSetMovieTeams.Verify(x => x.Remove((MovieTeam)movieTeams), Times.Once);
        }
        public void Verify_Update_Should_SetTheEntityStateToModified()
        {
            // Arrange
            Mock <IDbSet <MovieTeam> > mockSetMovieTeams;
            var mockContext = MovieTeamsMockingSetup.DoMockingSetupForContext(true, out mockSetMovieTeams);
            var repository  = new MovieTeamsRepository(mockContext.Object);
            var movieTeams  = repository.Get(1);

            movieTeams.ApiDetailUrl = "/TEST";
            // Act
            repository.Update(movieTeams);
            // Assert
            mockContext.Verify(x => x.SetModified(It.IsAny <object>()), Times.Once);
        }
 public void Verify_Get_ByID_Should_ReturnTheCorrectMovieTeam()
 {
     // Arrange
     Mock<IDbSet<MovieTeam>> mockSetMovieTeams;
     var mockContext = MovieTeamsMockingSetup.DoMockingSetupForContext(true, out mockSetMovieTeams);
     var repository = new MovieTeamsRepository(mockContext.Object);
     // Act
     var movieTeams = repository.Get(1);
     // Assert
                 Assert.Equal("/TEST/KING-STEPHEN", movieTeams.ApiDetailUrl);
 }
 public void Verify_Update_Should_SetTheEntityStateToModified()
 {
     // Arrange
     Mock<IDbSet<MovieTeam>> mockSetMovieTeams;
     var mockContext = MovieTeamsMockingSetup.DoMockingSetupForContext(true, out mockSetMovieTeams);
     var repository = new MovieTeamsRepository(mockContext.Object);
     var movieTeams = repository.Get(1);
     movieTeams.ApiDetailUrl = "/TEST";
     // Act
     repository.Update(movieTeams);
     // Assert
     mockContext.Verify(x => x.SetModified(It.IsAny<object>()), Times.Once);
 }
 public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
 {
     // Arrange
     Mock<IDbSet<MovieTeam>> mockSetMovieTeams;
     var mockContext = MovieTeamsMockingSetup.DoMockingSetupForContext(true, out mockSetMovieTeams);
     var repository = new MovieTeamsRepository(mockContext.Object);
     var movieTeams = repository.Get(1);
     // Act
     repository.Remove(movieTeams);
     // Assert
     mockSetMovieTeams.Verify(x => x.Remove((MovieTeam)movieTeams), Times.Once);
 }