/* * setGrid()'s functionality is already fully tested in TestLedPanel.java */ @Test public void call_setGrid() { boolean[][] grid = new boolean[16][16]; mockpanel.setGrid(grid); }
/* * A coverage caller as the methods: setKeyBoardShown, switchOn and switchOff simply call * a single method from java.awt.CardLayout therefore making them untestable in this package * unless perhaps a gui window was generated. However in the scope of junit this is a wasteful * and error prone venture. */ @Test public void coverage() { mockpanel.setKeyboardShown(true); mockpanel.switchOff(); mockpanel.switchOn(); }
@Test public void test_makeLedPanel() { LedPanel lp = mockpanel.makeLedPanel(keyboard, testmaker); assertThat("An LedPanel was not created as expected!", lp, instanceOf(LedPanel.class)); }