Statement Coverage | Branch Coverage | Loop Coverage | Strict Condition Coverage | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
public String showOpenDialog(String fileId) | 4 / 4 | 100 % |
|
1 / 2 | 50 % |
|
0 / 0 | --- | 0 / 1 | 0 % |
|
AppView.java | ||
---|---|---|
178 | public String showOpenDialog(String fileId) { | |
179 | JFileChooser chooser = new JFileChooser(); | |
180 | chooser.setDialogType(JFileChooser.OPEN_DIALOG); | |
181 | chooser.setDialogTitle("Open"); | |
182 | chooser.setFileSelectionMode(JFileChooser.FILES_ONLY); | |
183 | ||
184 | if (chooser.showOpenDialog(getWindowFromId(fileId)) == JFileChooser.APPROVE_OPTION) { | |
185 | return chooser.getSelectedFile().getAbsolutePath(); | |
186 | } | |
187 | ||
188 | return null; | |
189 | } |