package li.seiji.minichess;

/**
 * Created by seiji on 5/15/17.
 */
public class MoveTest {
}

package li.seiji.minichess;

import org.junit.Test;

import static junit.framework.TestCase.assertEquals;

public class MoveTest {

    @Test
    public void testMoveStringParsing() {
        Move move = new Move("c2-e4");
        assertSquareCorrect(move.from, 2, 1);
        assertSquareCorrect(move.to, 4, 3);

        move = new Move("e4-c2");
        assertSquareCorrect(move.from, 4, 3);
        assertSquareCorrect(move.to, 2, 1);
    }



    private static void assertSquareCorrect(Square square, int x, int y) {
        assertEquals(x, square.x);
        assertEquals(y, square.y);
    }

}

Implement Move TestCase