Beispiel #1
0
 public void blackjack()
 {
     Assert.AreEqual(21, exercises.Blackjack(19, 21), "blackjack(19, 21)");
     Assert.AreEqual(21, exercises.Blackjack(21, 19), "blackjack(21, 19)");
     Assert.AreEqual(19, exercises.Blackjack(19, 22), "blackjack(19, 22)");
     Assert.AreEqual(19, exercises.Blackjack(22, 19), "blackjack(22, 19)");
     Assert.AreEqual(0, exercises.Blackjack(23, 22), "blackjack(23, 22)");
     Assert.AreEqual(0, exercises.Blackjack(23, 22), "blackjack(10, 12)");
     Assert.AreEqual(21, exercises.Blackjack(21, 21), "blackjack(21, 21)");
     Assert.AreEqual(17, exercises.Blackjack(17, 17), "blackjack(17, 17)");
 }
Beispiel #2
0
        public void BlackjackTest()
        {
            Exercises e = new Exercises();

            Assert.AreEqual(21, e.Blackjack(19, 21));
            Assert.AreEqual(21, e.Blackjack(21, 19));
            Assert.AreEqual(19, e.Blackjack(19, 22));
            Assert.AreEqual(0, e.Blackjack(22, 50));
            Assert.AreEqual(0, e.Blackjack(22, 22));
            Assert.AreEqual(4, e.Blackjack(3, 4));
        }
Beispiel #3
0
        public void BlackjackTest()
        {
            Exercises blackjack = new Exercises();

            Assert.AreEqual(0, blackjack.Blackjack(22, 24));
            Assert.AreEqual(21, blackjack.Blackjack(19, 21));
            Assert.AreEqual(21, blackjack.Blackjack(21, 19));
            Assert.AreEqual(19, blackjack.Blackjack(19, 22));
            Assert.AreEqual(19, blackjack.Blackjack(22, 19));
            Assert.AreEqual(19, blackjack.Blackjack(17, 19));
        }