Exemplo n.º 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));
        }
Exemplo n.º 2
0
 public void WhenCardIsConstructedWithInvalidValue()
 {
     Assert.That(() => { var card = new Card("WD"); }, Throws.ArgumentException.With.Message.EqualTo("Invalid card value"));
 }
Exemplo n.º 3
0
 public void WhenCardIsConstructedWithInvalidShortNotation()
 {
     Assert.That(() => { var card = new Card(""); }, Throws.ArgumentException.With.Message.EqualTo("Card notation must be two characters"));
 }