October 2000
Intermediate to advanced
288 pages
5h 45m
English
We proposed a screen design earlier. The first thing we can test is that key widgets are present: a label, a query field, a button, and a table. There may be other components on the panel (for example, subpanels used for organization), but we don't care about them.
So we'll create testWidgetsPresent().To make this work, we need a.panel for the overall screen ("SearchPanel"), the label ("searchLabel"), a textfield for entering the query ("queryField"), a button ("findButton"), and a table for the results ("resultTable"). We'll let these widgets be package-access, so our test can see them.
public void testWidgetsPresent() { SearchPanel panel = new SearchPanel(); assertNotNull(panel.searchLabel); assertNotNull(panel.queryField); ...Read now
Unlock full access