Beispiel #1
0
        public void WhenCardIsConstructedWithShortNotation(string shortNotation, Value expectedValue, Suit expectedSuit)
        {
            var card = new Card(shortNotation);

            Assert.That(card.Value, Is.EqualTo(expectedValue));
            Assert.That(card.Suit, Is.EqualTo(expectedSuit));
        }
Beispiel #2
0
 public void WhenCardIsConstructedWithInvalidValue()
 {
     Assert.That(() => { var card = new Card("WD"); }, Throws.ArgumentException.With.Message.EqualTo("Invalid card value"));
 }
Beispiel #3
0
 public void WhenCardIsConstructedWithInvalidShortNotation()
 {
     Assert.That(() => { var card = new Card(""); }, Throws.ArgumentException.With.Message.EqualTo("Card notation must be two characters"));
 }