public async Task RunAnalysis_IncreaseOnWin_WinBet() { // Arrange var logger = Substitute.For <ILogger <RunAnalysis> >(); var playHand = Substitute.For <IPlayHand>(); var runAnalysis = new RunAnalysis(logger, playHand); var analysisConfiguration = new AnalysisConfiguration() { StartingAnte = 1, BettingStrategy = BettingStrategy.IncreaseOnWin, DeckCountPerShoe = 4, PlayerFunds = 10, TargetFunds = 11, AvailableActions = TestHelper.BuildAvailableActionsAlwaysStand() }; var updateProgress = Substitute.For <IUpdateProgress>(); // Act decimal result = await runAnalysis.Run(analysisConfiguration, updateProgress); // Assert }
public async Task RunAnalysis_Steady_ReturnsRemainingPot(BettingStrategy bettingStrategy) { // Arrange var logger = Substitute.For <ILogger <RunAnalysis> >(); var playHand = new PlayHand(); var runAnalysis = new RunAnalysis(logger, playHand); var analysisConfiguration = new AnalysisConfiguration() { StartingAnte = 1, BettingStrategy = bettingStrategy, DeckCountPerShoe = 4, PlayerFunds = 10, TargetFunds = 11, AvailableActions = TestHelper.BuildAvailableActionsAlwaysStand() }; var updateProgress = Substitute.For <IUpdateProgress>(); // Act decimal result = await runAnalysis.Run(analysisConfiguration, updateProgress); // Assert Assert.True(result <= analysisConfiguration.TargetFunds + 1); }