* @param harness the test harness (<code>null</code> not permitted).
*/
public void test(TestHarness harness)
{
JFileChooser fc = new JFileChooser();
BasicFileChooserUI ui = new BasicFileChooserUI(fc);
harness.check(ui.getDialogTitle(fc), null);
ui.installUI(fc);
harness.check(ui.getDialogTitle(fc), "Open");
fc.setDialogType(JFileChooser.SAVE_DIALOG);
harness.check(ui.getDialogTitle(fc), "Save");
fc.setDialogTitle("XYZ");
harness.check(ui.getDialogTitle(fc), "XYZ");
fc.setDialogTitle(null);
harness.check(ui.getDialogTitle(fc), "Save");
// try a null argument
boolean pass = false;
try
{
/*String t =*/ ui.getDialogTitle(null);
}
catch (NullPointerException e)
{
pass = true;
}