package ru.job4j.loop;

import org.junit.Test;

import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
/** 
*Class BoardTest
*@author Krohmal Kirill (mailto:krohmal_kirill@mail.ru)
*@since 26.05.2017
*/
public class BoardTest {
/**
* Test Board.
*/  
  @Test
    public void whenPaintBoardWithWidthThreeAndHeightThreeThenStringWithThreeColsAndThreeRows() {
        //assign
		String expected = String.format("x x%s x %sx x%s", line, line, line);
		final String line = System.getProperty("line.separator");
		Board board = new Board();
        //act
		String result = board.paint(3, 3);
        
        //assert
        assertThat(result, is(expected));
	}
  

    @Test
    public void whenPaintBoardWithWidthFiveAndHeightFourThenStringWithFiveColsAndFourRows() {
        //assign
		String expected = String.format("x x x%s x x %sx x x%s x x %s", line, line, line, line, line);
		Board board = new Board();
		final String line = System.getProperty("line.separator");
		//act
		String result = board.paint(5, 4);
		//assert
		assertThat(result, is(expected));
		//напишите здесь тест, проверяющий формирование доски 5 на 4.
    }
}


@@ -400,75 +400,32 @@
 n%0A%09%09
-String expected = String.format(%22x x%25s x %25sx x%25s%22, line, line, line
+Board board = new Board(
 );%0A%09
@@ -487,37 +487,8 @@
 %22);%0A
-%09%09Board board = new Board();%0A
     
@@ -542,16 +542,85 @@
         
+String expected = String.format(%22x x%25s x %25sx x%25s%22, line, line, line);
 %0A       
@@ -803,105 +803,8 @@
 ign%0A
-%09%09String expected = String.format(%22x x x%25s x x %25sx x x%25s x x %25s%22, line, line, line, line, line);%0A
 %09%09Bo
@@ -933,16 +933,113 @@
 (5, 4);%0A
+%09%09String expected = String.format(%22x x x%25s x x %25sx x x%25s x x %25s%22, line, line, line, line, line);%0A
 %09%09//asse

change in Board