コード例 #1
0
 public void PlayHandWithMoreThan2CardsLeftShouldNotChangeTheState()
 {
     var haveStateMock = new Mock<IStateManager>();
     var roundState = new MoreThanTwoCardsLeftRoundState(haveStateMock.Object);
     roundState.PlayHand(4);
     haveStateMock.Verify(x => x.SetState(It.IsAny<BaseRoundState>()), Times.Never);
 }
コード例 #2
0
 public void PlayHandWith2CardsLeftShouldChangeTheStateToTwoCardsLeftRoundState()
 {
     var haveStateMock = new Mock<IStateManager>();
     var roundState = new MoreThanTwoCardsLeftRoundState(haveStateMock.Object);
     roundState.PlayHand(2);
     haveStateMock.Verify(x => x.SetState(It.IsAny<TwoCardsLeftRoundState>()), Times.Once);
 }