package com.github.apixandru.games.rummikub.model;

import org.junit.Assert;
import org.junit.Test;

/**
 * @author Alexandru-Constantin Bledea
 * @since November 24, 2015
 */
public class BoardTest {

    @Test
    public void testValidFormation() {
        final Board board = new Board();
        board.placeCard(new Card(Color.BLACK, Rank.ONE), 0, 1);
        board.placeCard(new Card(Color.RED, Rank.ONE), 1, 1);
        board.placeCard(new Card(Color.BLUE, Rank.ONE), 2, 1);
        Assert.assertTrue(board.isValid());
    }
}

@@ -524,10 +524,402 @@
 ;%0A    %7D%0A
+%0A%0A    @Test%0A    public void testInvalidFormation() %7B%0A        final Board board = new Board();%0A        board.placeCard(new Card(Color.BLACK, Rank.ONE), 0, 1);%0A        board.placeCard(new Card(Color.RED, Rank.ONE), 3, 1);%0A        board.placeCard(new Card(Color.BLUE, Rank.ONE), 2, 1);%0A        Assert.assertFalse(board.isValid());%0A        Assert.assertEquals(2, board.getGroups().size());%0A    %7D%0A
 %7D%0A

add a new test