public void Move_ShouldWrapPlayerWhenEndOfBoardIsReached() { var mover = new Mover(new List<string>()); mover.SetPlayerLocation("Princie", 39); mover.Move("Princie", 6); Assert.That(mover.GetPlayerLocation("Princie"), Is.EqualTo(5)); }
public void Move_ShouldIncreaseThePlayerLocationByTheSpecifiedAmount() { var mover = new Mover(new List<string> { "Princie" }); mover.SetPlayerLocation("Princie", 0); mover.Move("Princie", 7); Assert.That(mover.GetPlayerLocation("Princie"), Is.EqualTo(7)); }
public void Move_WhenGivenANonexistingPlayer_ShouldThrowAnInvalidPlayerException() { var mover = new Mover(new List<string>()); Assert.Throws<InvalidPlayerException>(() => mover.Move("Princie", 7)); }