Beispiel #1
0
  @Test
  public void testShuffleDeck() {
    // Arrange
    Deck unshuffled = new EnDeck();
    Deck shuffeled = new EnDeck();

    // Act
    unshuffled.build();
    shuffeled.build();
    shuffeled.shuffle();

    // Assert
    assertNotEquals(unshuffled.cards, shuffeled.cards);
  }
Beispiel #2
0
  @Test
  public void testBuildDeck() {
    // Arrange
    Deck d = new EnDeck();

    // Act
    d.build();

    // Assert
    assertNotEquals(null, d.cards);
  }
Beispiel #3
0
  @Test
  public void testDrawCardFromDeck() {
    // Arrange
    Deck d = new EnDeck();
    Card cRec = null;

    // Act
    d.build();
    cRec = d.deal();

    // Assert
    assertNotEquals(null, cRec);
  }