public void Verify_Get_ByKey_Should_ReturnTheCorrectConceptVolume()
        {
            // Arrange
            Mock <IDbSet <ConceptVolume> > mockSetConceptVolumes;
            var mockContext = ConceptVolumesMockingSetup.DoMockingSetupForContext(true, out mockSetConceptVolumes);
            var repository  = new ConceptVolumesRepository(mockContext.Object);
            // Act
            var conceptVolumes = repository.Get("KING-STEPHEN");

            // Assert
            Assert.Equal("/TEST/KING-STEPHEN", conceptVolumes.ApiDetailUrl);
        }
 public void Verify_Deactivate_Should_SetTheActivePropertyToFalseOnTheEntity()
 {
     // Arrange
     Mock<IDbSet<ConceptVolume>> mockSetConceptVolumes;
     var mockContext = ConceptVolumesMockingSetup.DoMockingSetupForContext(true, out mockSetConceptVolumes);
     var repository = new ConceptVolumesRepository(mockContext.Object);
     var conceptVolumes = repository.Get(1);
     // Act
     repository.Deactivate(conceptVolumes);
     // Assert
     Assert.Equal(false, conceptVolumes.Active);
 }
        public void Verify_Deactivate_Should_SetTheActivePropertyToFalseOnTheEntity()
        {
            // Arrange
            Mock <IDbSet <ConceptVolume> > mockSetConceptVolumes;
            var mockContext    = ConceptVolumesMockingSetup.DoMockingSetupForContext(true, out mockSetConceptVolumes);
            var repository     = new ConceptVolumesRepository(mockContext.Object);
            var conceptVolumes = repository.Get(1);

            // Act
            repository.Deactivate(conceptVolumes);
            // Assert
            Assert.Equal(false, conceptVolumes.Active);
        }
        public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
        {
            // Arrange
            Mock <IDbSet <ConceptVolume> > mockSetConceptVolumes;
            var mockContext    = ConceptVolumesMockingSetup.DoMockingSetupForContext(true, out mockSetConceptVolumes);
            var repository     = new ConceptVolumesRepository(mockContext.Object);
            var conceptVolumes = repository.Get(1);

            // Act
            repository.Remove(conceptVolumes);
            // Assert
            mockSetConceptVolumes.Verify(x => x.Remove((ConceptVolume)conceptVolumes), Times.Once);
        }
        public void Verify_Update_Should_SetTheEntityStateToModified()
        {
            // Arrange
            Mock <IDbSet <ConceptVolume> > mockSetConceptVolumes;
            var mockContext    = ConceptVolumesMockingSetup.DoMockingSetupForContext(true, out mockSetConceptVolumes);
            var repository     = new ConceptVolumesRepository(mockContext.Object);
            var conceptVolumes = repository.Get(1);

            conceptVolumes.ApiDetailUrl = "/TEST";
            // Act
            repository.Update(conceptVolumes);
            // Assert
            mockContext.Verify(x => x.SetModified(It.IsAny <object>()), Times.Once);
        }
 public void Verify_Get_ByID_Should_ReturnTheCorrectConceptVolume()
 {
     // Arrange
     Mock<IDbSet<ConceptVolume>> mockSetConceptVolumes;
     var mockContext = ConceptVolumesMockingSetup.DoMockingSetupForContext(true, out mockSetConceptVolumes);
     var repository = new ConceptVolumesRepository(mockContext.Object);
     // Act
     var conceptVolumes = repository.Get(1);
     // Assert
                 Assert.Equal("/TEST/KING-STEPHEN", conceptVolumes.ApiDetailUrl);
 }
 public void Verify_Update_Should_SetTheEntityStateToModified()
 {
     // Arrange
     Mock<IDbSet<ConceptVolume>> mockSetConceptVolumes;
     var mockContext = ConceptVolumesMockingSetup.DoMockingSetupForContext(true, out mockSetConceptVolumes);
     var repository = new ConceptVolumesRepository(mockContext.Object);
     var conceptVolumes = repository.Get(1);
     conceptVolumes.ApiDetailUrl = "/TEST";
     // Act
     repository.Update(conceptVolumes);
     // Assert
     mockContext.Verify(x => x.SetModified(It.IsAny<object>()), Times.Once);
 }
 public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
 {
     // Arrange
     Mock<IDbSet<ConceptVolume>> mockSetConceptVolumes;
     var mockContext = ConceptVolumesMockingSetup.DoMockingSetupForContext(true, out mockSetConceptVolumes);
     var repository = new ConceptVolumesRepository(mockContext.Object);
     var conceptVolumes = repository.Get(1);
     // Act
     repository.Remove(conceptVolumes);
     // Assert
     mockSetConceptVolumes.Verify(x => x.Remove((ConceptVolume)conceptVolumes), Times.Once);
 }