public void GiveAObjWhenIsABoardTaskCollectionThenReturnsTrue() { // Arrange SetupState(); var boardTaskCollection = new BoardTaskCollection(); // Act var isAppliable = state.IsAppliable(boardTaskCollection); // Assert Assert.True(isAppliable); }
public void GivenAObjWhenIsABoardTaskCollectionThenSelfLinkAdded() { // Arrange SetupState(); mockLinkFactory.Setup(x => x.Build("BoardsSearch", It.IsAny<object>())).Returns("http://fake-url/"); var boardTaskCollection = new BoardTaskCollection(); // Act state.Apply(boardTaskCollection); // Assert Assert.NotNull(boardTaskCollection.Links); Assert.NotNull(boardTaskCollection.Links.FirstOrDefault(x => x.Rel == Link.SELF)); }
public void GivenAnObjectWhenIsABoardTaskCollectionThenApplyBoardStatesToAllBoards() { // Arrange SetupState(); mockLinkFactory.Setup(x => x.Build("BoardsSearch", It.IsAny<object>())).Returns("http://fake-url/"); var boardTaskCollection = new BoardTaskCollection { Items = new List<BoardTask> { new BoardTask() } }; // Act state.Apply(boardTaskCollection); // Asset mockBoardTaskState.Verify(x => x.Apply(It.IsAny<BoardTask>()), Times.Once); }