Esempio n. 1
0
        public void Given_I_Have_a_playerTotal_22_and_a_dealerTotal_18_return_dealer()
        {
            //Given I have a total of 22
            int playerTotal = 22;
            //And I have a dealer list with a total of 18
            int dealerTotal = 18;
            //When i call the winner Method
            IWinner win   = new Winner();
            string  final = win.Calculate(playerTotal, dealerTotal);

            //Then i get back a string stating "dealer has won"
            Assert.AreEqual("dealer", final);
        }
Esempio n. 2
0
        public void Given_I_Have_a_playerTotal_12_and_a_dealerTotal_12_return_draw()
        {
            //Given I have a total of 12
            int playerTotal = 12;
            //And I have a dealer list with a total of 12
            int dealerTotal = 12;
            //When i call the winner Method
            IWinner win   = new Winner();
            string  final = win.Calculate(playerTotal, dealerTotal);

            //Then i get back a string stating "a draw has occured
            Assert.AreEqual("draw", final);
        }