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