public void GiveAObjWhenIsABoardCollectionThenReturnsTrue()
        {
            // Arrange
            SetupState();
            var boardCollection = new BoardCollection();

            // Act
            var isAppliable = state.IsAppliable(boardCollection);

            // Assert
            Assert.True(isAppliable);
        }
        public void GivenAObjWhenIsABoardCollectionThenSelfLinkAdded()
        {
            // Arrange
            SetupState();
            mockLinkFactory.Setup(x => x.Build("BoardSearch", It.IsAny<object>())).Returns("http://fake-url/");
            var boardCollection = new BoardCollection();

            // Act
            state.Apply(boardCollection);

            // Assert
            Assert.NotNull(boardCollection.Links);
            Assert.NotNull(boardCollection.Links.FirstOrDefault(x => x.Rel == Link.SELF));
        }
        public void GivenAnObjectWhenIsABoardCollectionThenApplyBoardStatesToAllBoards()
        {
            // Arrange
            SetupState();
            mockLinkFactory.Setup(x => x.Build("BoardSearch", It.IsAny<object>())).Returns("http://fake-url/");
            var boardCollection = new BoardCollection
            {
                Items = new List<Board>
                {
                    new Board()
                }
            };

            // Act
            state.Apply(boardCollection);

            // Asset
            mockBoardState.Verify(x => x.Apply(It.IsAny<Board>()), Times.Once);
        }