@@ -0,0 +1,1062 @@
+/**%0A *%0A */%0Apackage com.github.apixandru.games.rummikub;%0A%0Aimport java.util.NoSuchElementException;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0A/**%0A * @author Alexandru-Constantin Bledea%0A * @since Sep 20, 2015%0A */%0A@SuppressWarnings (%22static-method%22)%0Apublic class CardPileTest %7B%0A%0A%09/**%0A%09 * @throws Exception%0A%09 */%0A%09@Test%0A%09public void testNumberOfCards() throws Exception %7B%0A%09%09final CardPile cardPile = new CardPile();%0A%09%09Assert.assertSame(%22Numbers of cards don't match%22, 54, cardPile.getNumberOfCards());%0A%09%7D%0A%0A%09/**%0A%09 * @throws Exception%0A%09 */%0A%09@Test%0A%09public void testHasCards() throws Exception %7B%0A%09%09final CardPile cardPile = new CardPile();%0A%09%09while (cardPile.hasMoreCards()) %7B%0A%09%09%09Assert.assertNotNull(%22Should have cards%22, cardPile.nextCard());%0A%09%09%7D%0A%09%7D%0A%0A%09/**%0A%09 * @throws Exception%0A%09 */%0A%09@Test (expected = NoSuchElementException.class)%0A%09public void testExhaustedPile() throws Exception %7B%0A%09%09final CardPile cardPile = new CardPile();%0A%09%09while (cardPile.hasMoreCards()) %7B%0A%09%09%09Assert.assertNotNull(%22Should have cards%22, cardPile.nextCard());%0A%09%09%7D%0A%09%09cardPile.nextCard();%0A%09%7D%0A%0A%7D%0A

add tests for card pile