package ru.job4j.loop;

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

import static org.hamcrest.core.Is.is;

/**
 * Class BoardTest.
 *
 * @author Dmitriy Serov
 * @version 0.1
 * @since 06.05.18
 */
public class BoardTest {
    /**
     * Test Board when 3 x 3.
     */
    @Test
    public void when3x3() {
        Board board = new Board();
        String rs1 = board.paint(3, 3);
        String ln = System.lineSeparator();
        Assert.assertThat(rs1, is(String.format("X X%s X %sX X%s", ln, ln, ln)));
    }

    /**
     * Test Board when 5 x 4.
     */
    @Test
    public void when5x4() {
        Board board = new Board();
        String rs1 = board.paint(5, 4);
        String ln = System.lineSeparator();
        Assert.assertThat(rs1, is(String.format("X X X%s X X %sX X X%s X X %s", ln, ln, ln, ln)));
    }
}
