Can any one help me write test cases for file dialog operation
void buttonActionPerformed(java.awt.event.ActionEvent event) { String filename; FileDialog dialog=new FileDialog(this,"Open Old File"); dialog.setMode(FileDialog.LOAD); dialog.show(); filename=dialog.getFile(); System.out.println("File name "+filename); if (filename==null) return ; filename=dialog.getDirectory()+filename; System.out.println("File name "+filename); }
Log in to post a comment.
Can any one help me write test cases for file dialog operation
void buttonActionPerformed(java.awt.event.ActionEvent event)
{ String filename;
FileDialog dialog=new FileDialog(this,"Open Old File");
dialog.setMode(FileDialog.LOAD);
dialog.show();
filename=dialog.getFile();
System.out.println("File name "+filename);
if (filename==null) return ;
filename=dialog.getDirectory()+filename;
System.out.println("File name "+filename);
}