package ru.szhernovoy;

import org.junit.Assert;
import org.junit.Test;
import ru.szhernovoy.view.*;

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

/**
 * Created by szhernovoy on 16.08.2016.
 */
public class TicTacToeTest {
    @Test
    public void whenSetSizeBoardThenFabricaGenerateIt(){

        int control = 5;
        Cell[][] cells = new GeneratorBoard(control).generate();
        Assert.assertThat(control,is(cells.length));

    }



}

@@ -65,16 +65,52 @@
 t.Test;%0A
+import ru.szhernovoy.control.Logic;%0A
 import r
@@ -467,12 +467,420 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void whenSetXOnRowThatXisWinner()%7B%0A%0A        Cell%5B%5D%5B%5D cells = new GeneratorBoard().generate();%0A        cells%5B0%5D%5B0%5D.setIconX(true);%0A        cells%5B0%5D%5B1%5D.setIconX(true);%0A        cells%5B0%5D%5B2%5D.setIconX(true);%0A%0A        Logic logic = new Logic();%0A        logic.loadBoard(cells);%0A        int result = logic.isWinner();%0A        int winner = 0;%0A        Assert.assertThat(winner,is(result));%0A%0A    %7D%0A%0A
 %0A%0A%7D%0A

update TIC TAC TOE 1