package li.seiji.minichess;

import li.seiji.helpers.MoveHelper;
import li.seiji.minichess.move.Move;
import org.junit.Test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.fail;

public class StateTest {

    @Test //Tests a move that is physically valid (does not follow the rules)
    public void testExecutePhysicallyValidMove() throws InvalidMoveException {
        State state = new State();
        state.initialize();
        Move move = MoveHelper.generateRandomPhysicallyValidMove(state);
        State newState = state.move(move);
        assertEquals(Player.BLACK, newState.turn);
    }

    @Test
    public void testExecutePhysicallyInvalidMove() {
        State state = new State();
        state.initialize();
        Move move = MoveHelper.generateRandomPhysicallyInvalidMove(state);
        try {
            state.move(move);
            fail("Expected InvalidMoveException");
        } catch (InvalidMoveException e) {}
    }
    
}

@@ -168,56 +168,8 @@
 ls;%0A
-import static org.junit.Assert.assertNotEquals;%0A
 impo
@@ -968,15 +968,96 @@
 %7D%0A    %7D%0A
+%0A%0A
     
+//TODO: implement a test that checks every invalid move for negative validity?%0A
 %0A%7D%0A

Add TODO to StateTest