public void RandomizeBriefcaseValues__ShouldReturnLength26() { Game game = new Game(); BriefcaseService briefcaseProcessor = new BriefcaseService(game); List <Briefcase> briefcases = briefcaseProcessor.RandomizeBriefcaseValues(); Assert.True(briefcases.Count == 26); }
public void RandomizeBriefcaseValues__ShouldNotHaveRepeatingValues() { Game game = new Game(); BriefcaseService briefcaseProcessor = new BriefcaseService(game); List <Briefcase> briefcases = briefcaseProcessor.RandomizeBriefcaseValues(); Briefcase firstBriefcase = briefcases.First(); double amount = firstBriefcase.Amount; bool isAmountDuplicated = CheckAmountForDuplicates(briefcases, firstBriefcase); Assert.False(isAmountDuplicated); }
static void Main(string[] args) { Console.WriteLine("Let's play Deal Or No Deal..."); Game game = new Game(); IBriefcaseService briefcaseService = new BriefcaseService(game); IPlayerService playerService = new PlayerService(briefcaseService); IBankerOfferService bankerOfferService = new BankerOfferService(); IGameRoundService gameRoundService = new GameRoundService(briefcaseService, bankerOfferService); GameInstance dealOrNoDeal = new GameInstance(briefcaseService, playerService, gameRoundService); dealOrNoDeal.Run(game); Console.ReadKey(); }