public void Verify_Get_ByKey_Should_ReturnTheCorrectTeamVolume()
        {
            // Arrange
            Mock <IDbSet <TeamVolume> > mockSetTeamVolumes;
            var mockContext = TeamVolumesMockingSetup.DoMockingSetupForContext(true, out mockSetTeamVolumes);
            var repository  = new TeamVolumesRepository(mockContext.Object);
            // Act
            var teamVolumes = repository.Get("KING-STEPHEN");

            // Assert
            Assert.Equal("/TEST/KING-STEPHEN", teamVolumes.ApiDetailUrl);
        }
 public void Verify_Deactivate_Should_SetTheActivePropertyToFalseOnTheEntity()
 {
     // Arrange
     Mock<IDbSet<TeamVolume>> mockSetTeamVolumes;
     var mockContext = TeamVolumesMockingSetup.DoMockingSetupForContext(true, out mockSetTeamVolumes);
     var repository = new TeamVolumesRepository(mockContext.Object);
     var teamVolumes = repository.Get(1);
     // Act
     repository.Deactivate(teamVolumes);
     // Assert
     Assert.Equal(false, teamVolumes.Active);
 }
        public void Verify_Deactivate_Should_SetTheActivePropertyToFalseOnTheEntity()
        {
            // Arrange
            Mock <IDbSet <TeamVolume> > mockSetTeamVolumes;
            var mockContext = TeamVolumesMockingSetup.DoMockingSetupForContext(true, out mockSetTeamVolumes);
            var repository  = new TeamVolumesRepository(mockContext.Object);
            var teamVolumes = repository.Get(1);

            // Act
            repository.Deactivate(teamVolumes);
            // Assert
            Assert.Equal(false, teamVolumes.Active);
        }
        public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
        {
            // Arrange
            Mock <IDbSet <TeamVolume> > mockSetTeamVolumes;
            var mockContext = TeamVolumesMockingSetup.DoMockingSetupForContext(true, out mockSetTeamVolumes);
            var repository  = new TeamVolumesRepository(mockContext.Object);
            var teamVolumes = repository.Get(1);

            // Act
            repository.Remove(teamVolumes);
            // Assert
            mockSetTeamVolumes.Verify(x => x.Remove((TeamVolume)teamVolumes), Times.Once);
        }
        public void Verify_Update_Should_SetTheEntityStateToModified()
        {
            // Arrange
            Mock <IDbSet <TeamVolume> > mockSetTeamVolumes;
            var mockContext = TeamVolumesMockingSetup.DoMockingSetupForContext(true, out mockSetTeamVolumes);
            var repository  = new TeamVolumesRepository(mockContext.Object);
            var teamVolumes = repository.Get(1);

            teamVolumes.ApiDetailUrl = "/TEST";
            // Act
            repository.Update(teamVolumes);
            // Assert
            mockContext.Verify(x => x.SetModified(It.IsAny <object>()), Times.Once);
        }
 public void Verify_Get_ByID_Should_ReturnTheCorrectTeamVolume()
 {
     // Arrange
     Mock<IDbSet<TeamVolume>> mockSetTeamVolumes;
     var mockContext = TeamVolumesMockingSetup.DoMockingSetupForContext(true, out mockSetTeamVolumes);
     var repository = new TeamVolumesRepository(mockContext.Object);
     // Act
     var teamVolumes = repository.Get(1);
     // Assert
                 Assert.Equal("/TEST/KING-STEPHEN", teamVolumes.ApiDetailUrl);
 }
 public void Verify_Update_Should_SetTheEntityStateToModified()
 {
     // Arrange
     Mock<IDbSet<TeamVolume>> mockSetTeamVolumes;
     var mockContext = TeamVolumesMockingSetup.DoMockingSetupForContext(true, out mockSetTeamVolumes);
     var repository = new TeamVolumesRepository(mockContext.Object);
     var teamVolumes = repository.Get(1);
     teamVolumes.ApiDetailUrl = "/TEST";
     // Act
     repository.Update(teamVolumes);
     // Assert
     mockContext.Verify(x => x.SetModified(It.IsAny<object>()), Times.Once);
 }
 public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
 {
     // Arrange
     Mock<IDbSet<TeamVolume>> mockSetTeamVolumes;
     var mockContext = TeamVolumesMockingSetup.DoMockingSetupForContext(true, out mockSetTeamVolumes);
     var repository = new TeamVolumesRepository(mockContext.Object);
     var teamVolumes = repository.Get(1);
     // Act
     repository.Remove(teamVolumes);
     // Assert
     mockSetTeamVolumes.Verify(x => x.Remove((TeamVolume)teamVolumes), Times.Once);
 }