private static Action <GameFinishedData> GivenEventFinishedHandler(ScoreWhilePlayingGame scoreWhilePlayingGame) { var gameFinishedHandler = Substitute.For <Action <GameFinishedData> >(); scoreWhilePlayingGame.GameFinished += gameFinishedHandler; return(gameFinishedHandler); }
private static void RollAndAssert(ScoreWhilePlayingGame g, int pins, int expectedCurrentScore) { g.Roll(pins); g.CurrentScore().Should().Be(expectedCurrentScore); }