
import junit.framework.TestCase;

/**
 * This class tests the KnightsTourBoard class with junit test cases.
 */
public class KnightsTourBoardTest extends TestCase
{
    public void testKnightsTourBoardImpossible1()
    {
        KnightsTourBoard ktb = new KnightsTourBoard(3, 3);

        assertFalse(ktb.tour(0, 0));
        assertFalse(ktb.tour(1, 1));
        assertFalse(ktb.tour(0, 1));
    }

    public void testKnightsTourBoardImpossible2()
    {
        KnightsTourBoard ktb = new KnightsTourBoard(2, 3);

        assertFalse(ktb.tour(0, 0));
        assertFalse(ktb.tour(0, 1));
    }

    public void testKnightsTourBoardPossible1()
    {
        KnightsTourBoard ktb = new KnightsTourBoard(5, 5);

        assertTrue(ktb.tour(0, 0));
    }

    public void testKnightsTourBoardPossible2()
    {
        KnightsTourBoard ktb = new KnightsTourBoard(3, 4);

        assertTrue(ktb.tour(0, 0));
    }
}
