예제 #1
0
 public void IsThirdParameter()
 {
     try
     {
         DeckValidation.IsThird(null);
     }
     catch (InvalidProgramException)
     {
         Assert.IsTrue(true);
     }
 }
예제 #2
0
 public void IsThirdTestValid()
 {
     {
         DeckCards validThird = new DeckCards();
         validThird.AddCard(new Card(Card.CardValue.Ace, Card.CardSuit.Heart));
         validThird.AddCard(new Card(Card.CardValue.Ace, Card.CardSuit.Diamond));
         validThird.AddCard(new Card(Card.CardValue.Ace, Card.CardSuit.Club));
         Assert.IsTrue(DeckValidation.IsThird(validThird));
     }
     {
         DeckCards validThird = new DeckCards();
         validThird.AddCard(new Card(Card.CardValue.Ace, Card.CardSuit.Heart));
         validThird.AddCard(new Card(Card.CardValue.Ace, Card.CardSuit.Diamond));
         validThird.AddCard(new Card(Card.CardValue.Ace, Card.CardSuit.Club));
         validThird.AddCard(new Card(Card.CardValue.Ace, Card.CardSuit.Spade));
         Assert.IsTrue(DeckValidation.IsThird(validThird));
     }
 }
예제 #3
0
 public void IsThirdTestInvalid()
 {
     {
         DeckCards invalidThird = new DeckCards();
         invalidThird.AddCard(new Card(Card.CardValue.Ace, Card.CardSuit.Heart));
         invalidThird.AddCard(new Card(Card.CardValue.Two, Card.CardSuit.Diamond));
         invalidThird.AddCard(new Card(Card.CardValue.Ace, Card.CardSuit.Club));
         Assert.IsFalse(DeckValidation.IsThird(invalidThird));
     }
     {
         DeckCards invalidThird = new DeckCards();
         invalidThird.AddCard(new Card(Card.CardValue.Ace, Card.CardSuit.Heart));
         invalidThird.AddCard(new Card(Card.CardValue.Ace, Card.CardSuit.Club));
         Assert.IsFalse(DeckValidation.IsThird(invalidThird));
     }
     {
         DeckCards invalidThird = new DeckCards();
         invalidThird.AddCard(new Card(Card.CardValue.Ace, Card.CardSuit.Heart));
         invalidThird.AddCard(new Card(Card.CardValue.Ace, Card.CardSuit.Club));
         invalidThird.AddCard(new Card(Card.CardValue.Ace, Card.CardSuit.Spade));
         invalidThird.AddCard(new Card(Card.CardValue.Two, Card.CardSuit.Club));
         Assert.IsFalse(DeckValidation.IsThird(invalidThird));
     }
 }