public void UpdateWith_ListOfPlayers_CalculatesCulumlativePercentages() { var sut = new ActionSequenceStatisticsSetMock( new[] { _stub.Out <IActionSequenceStatistic>() }, _stub.Out <IPercentagesCalculator>()); var analyzablePokerPlayers = new[] { _stub.Out <IAnalyzablePokerPlayer>() }; sut.UpdateWith(analyzablePokerPlayers); sut.CumulativePercentagesCalculated.ShouldBeTrue(); }
public void UpdateWith_Always_RaisesStatisticsWereUpdatedWithItselfAsArgument() { var sut = new ActionSequenceStatisticsSetMock( new[] { _stub.Out <IActionSequenceStatistic>() }, _stub.Out <IPercentagesCalculator>()); bool wasRaisedWithCorrectArgument = false; sut.StatisticsWereUpdated += arg => wasRaisedWithCorrectArgument = arg == sut; sut.UpdateWith(_stub.Out <IEnumerable <IAnalyzablePokerPlayer> >()); wasRaisedWithCorrectArgument.ShouldBeTrue(); }