public void DiceCup_InitialRollSaveFirstThreeValues_ThreeDiceInTheCupWerePlacedInTheHeldState() { // Arrange var die = _dieMock.Object; var dice = new List <IDie> { die, die, die, die, die }; // Act var diceCup = new DiceCup(dice); diceCup.Roll(); diceCup.Hold(0, 1, 2); //Assert _dieMock.VerifySet(x => x.State = DieState.Held, Times.Exactly(3)); }
public void DiceCup_InitialRollHoldThreeValuesUnholdTwoValues_ThreeDiceInTheCupWerePlacedInTheHeldStateAndTwoDiceInTheCupWerePlacedInTheThrowableState() { // Arrange var die = _dieMock.Object; var dice = new List <IDie> { die, die, die, die, die }; // Act var diceCup = new DiceCup(dice); diceCup.Roll(); diceCup.Hold(0, 2, 4); diceCup.Unhold(2, 4); // Assert _dieMock.VerifySet(x => x.State = DieState.Held, Times.Exactly(3)); _dieMock.VerifySet(x => x.State = DieState.Throwable, Times.Exactly(2)); }