public void Verify_Get_ByKey_Should_ReturnTheCorrectObjectStoryArc()
        {
            // Arrange
            Mock <IDbSet <ObjectStoryArc> > mockSetObjectStoryArcs;
            var mockContext = ObjectStoryArcsMockingSetup.DoMockingSetupForContext(true, out mockSetObjectStoryArcs);
            var repository  = new ObjectStoryArcsRepository(mockContext.Object);
            // Act
            var objectStoryArcs = repository.Get("KING-STEPHEN");

            // Assert
            Assert.Equal("/TEST/KING-STEPHEN", objectStoryArcs.ApiDetailUrl);
        }
 public void Verify_Deactivate_Should_SetTheActivePropertyToFalseOnTheEntity()
 {
     // Arrange
     Mock<IDbSet<ObjectStoryArc>> mockSetObjectStoryArcs;
     var mockContext = ObjectStoryArcsMockingSetup.DoMockingSetupForContext(true, out mockSetObjectStoryArcs);
     var repository = new ObjectStoryArcsRepository(mockContext.Object);
     var objectStoryArcs = repository.Get(1);
     // Act
     repository.Deactivate(objectStoryArcs);
     // Assert
     Assert.Equal(false, objectStoryArcs.Active);
 }
        public void Verify_Deactivate_Should_SetTheActivePropertyToFalseOnTheEntity()
        {
            // Arrange
            Mock <IDbSet <ObjectStoryArc> > mockSetObjectStoryArcs;
            var mockContext     = ObjectStoryArcsMockingSetup.DoMockingSetupForContext(true, out mockSetObjectStoryArcs);
            var repository      = new ObjectStoryArcsRepository(mockContext.Object);
            var objectStoryArcs = repository.Get(1);

            // Act
            repository.Deactivate(objectStoryArcs);
            // Assert
            Assert.Equal(false, objectStoryArcs.Active);
        }
        public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
        {
            // Arrange
            Mock <IDbSet <ObjectStoryArc> > mockSetObjectStoryArcs;
            var mockContext     = ObjectStoryArcsMockingSetup.DoMockingSetupForContext(true, out mockSetObjectStoryArcs);
            var repository      = new ObjectStoryArcsRepository(mockContext.Object);
            var objectStoryArcs = repository.Get(1);

            // Act
            repository.Remove(objectStoryArcs);
            // Assert
            mockSetObjectStoryArcs.Verify(x => x.Remove((ObjectStoryArc)objectStoryArcs), Times.Once);
        }
        public void Verify_Update_Should_SetTheEntityStateToModified()
        {
            // Arrange
            Mock <IDbSet <ObjectStoryArc> > mockSetObjectStoryArcs;
            var mockContext     = ObjectStoryArcsMockingSetup.DoMockingSetupForContext(true, out mockSetObjectStoryArcs);
            var repository      = new ObjectStoryArcsRepository(mockContext.Object);
            var objectStoryArcs = repository.Get(1);

            objectStoryArcs.ApiDetailUrl = "/TEST";
            // Act
            repository.Update(objectStoryArcs);
            // Assert
            mockContext.Verify(x => x.SetModified(It.IsAny <object>()), Times.Once);
        }
 public void Verify_Get_ByID_Should_ReturnTheCorrectObjectStoryArc()
 {
     // Arrange
     Mock<IDbSet<ObjectStoryArc>> mockSetObjectStoryArcs;
     var mockContext = ObjectStoryArcsMockingSetup.DoMockingSetupForContext(true, out mockSetObjectStoryArcs);
     var repository = new ObjectStoryArcsRepository(mockContext.Object);
     // Act
     var objectStoryArcs = repository.Get(1);
     // Assert
                 Assert.Equal("/TEST/KING-STEPHEN", objectStoryArcs.ApiDetailUrl);
 }
 public void Verify_Update_Should_SetTheEntityStateToModified()
 {
     // Arrange
     Mock<IDbSet<ObjectStoryArc>> mockSetObjectStoryArcs;
     var mockContext = ObjectStoryArcsMockingSetup.DoMockingSetupForContext(true, out mockSetObjectStoryArcs);
     var repository = new ObjectStoryArcsRepository(mockContext.Object);
     var objectStoryArcs = repository.Get(1);
     objectStoryArcs.ApiDetailUrl = "/TEST";
     // Act
     repository.Update(objectStoryArcs);
     // Assert
     mockContext.Verify(x => x.SetModified(It.IsAny<object>()), Times.Once);
 }
 public void Verify_Remove_Should_RemoveTheEntityFromTheContext()
 {
     // Arrange
     Mock<IDbSet<ObjectStoryArc>> mockSetObjectStoryArcs;
     var mockContext = ObjectStoryArcsMockingSetup.DoMockingSetupForContext(true, out mockSetObjectStoryArcs);
     var repository = new ObjectStoryArcsRepository(mockContext.Object);
     var objectStoryArcs = repository.Get(1);
     // Act
     repository.Remove(objectStoryArcs);
     // Assert
     mockSetObjectStoryArcs.Verify(x => x.Remove((ObjectStoryArc)objectStoryArcs), Times.Once);
 }