コード例 #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));
     }
 }