コード例 #1
0
 public void shouldThrowErrorWhenSettingCurrentDirectoryInDisabledJFileChooser() {
   disableFileChooser();
   try {
     driver.setCurrentDirectory(fileChooser, userHomeDirectory());
     failWhenExpectingException();
   } catch (IllegalStateException e) {
     assertActionFailureDueToDisabledComponent(e);
   }
 }
コード例 #2
0
 public void shouldThrowErrorWhenSettingCurrentDirectoryInNotShowingJFileChooser() {
   hideWindow();
   try {
     driver.setCurrentDirectory(fileChooser, userHomeDirectory());
     failWhenExpectingException();
   } catch (IllegalStateException e) {
     assertActionFailureDueToNotShowingComponent(e);
   }
 }
コード例 #3
0
 public void shouldSetCurrentDirectory() {
   File userHome = userHomeDirectory();
   driver.setCurrentDirectory(fileChooser, userHome);
   assertThat(currentDirectoryAbsolutePath(fileChooser)).isEqualTo(userHome.getAbsolutePath());
 }