import org.junit.Test; import static org.junit.Assert.assertEquals; /** * The test class HexBoardTest -- it tests the HexBoard class * * @author Phill Conrad, and (insert your name here) * @version lab04 for CS56, Spring 2011 * @see HexBoard */ public class HexBoardTest { /** Test a 3x3 board */ @Test public void testConstructorAndToString3() { HexBoard hb = new HexBoard(3); String expected = " __ \n" + "/ \\__ \n" + "\\__/ \\__ \n" + "/ \\__/ \\\n" + "\\__/ \\__/\n" + "/ \\__/ \\\n" + "\\__/ \\__/\n" + " \\__/ \\\n" + " \\__/\n"; assertEquals(expected,hb.toString()); } }