Exemplo n.º 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);
  }
Exemplo n.º 2
0
  @Test
  public void testBuildDeck() {
    // Arrange
    Deck d = new EnDeck();

    // Act
    d.build();

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

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

    // Assert
    assertNotEquals(null, cRec);
  }