Esempio n. 1
0
        public async Task <int> Evaluate(List <int> handIds)
        {
            //lowets rankOrder value = highest hand value
            var highestHandId = await _handService.GetAll().Where(t => handIds.Contains(t.Id)).OrderBy(t => t.RankOrder).Select(t => t.Id).FirstOrDefaultAsync();

            return(handIds.FirstOrDefault(h => h == highestHandId));
        }
        public void Number_Of_Total_Hands_Is_Equal_To_10()
        {
            int numberOfRecords = 0;

            Task.Run(async() =>
            {
                numberOfRecords = await _handService.GetAll().CountAsync();
            }).GetAwaiter().GetResult();

            Assert.AreEqual(10, numberOfRecords);
        }