@Test public void TestClickOnGridAt() { System.out.println("clickOnGridAt"); instance.clickOnGridAt(0, 0, "X"); Object expResult = "X"; Object result = instance.getCellAt(0, 0); assertEquals(expResult, result); }
@Test public void testClear() { System.out.println("clear"); instance.setCellAt("X", 0, 0); Object expResult = null; instance.clear(); Object result = instance.getCellAt(0, 0); assertEquals(expResult, result); }
@Test public void TestGetCellAt() { System.out.println("getCellAt"); Image image = Toolkit.getDefaultToolkit().createImage(getClass().getResource("resources/x-icon.gif")); ImageIcon icon = new ImageIcon(image); icon.setDescription("X"); instance.setValueAt(icon, 0, 0); String expResult = "X"; String result = instance.getCellAt(0, 0); assertEquals(expResult, result); }