public void shouldThrowErrorIfFilesToSelectIsNull() { try { driver.selectFiles(fileChooser, null); failWhenExpectingException(); } catch (NullPointerException e) { assertThat(e.getMessage()).isEqualTo("The files to select should not be null"); } }
public void shouldThrowErrorIfAnyFileToSelectIsNull() { try { driver.selectFiles(fileChooser, array(new File("Fake"), null)); failWhenExpectingException(); } catch (NullPointerException e) { assertThat(e.getMessage()) .isEqualTo("The array of files to select should not contain null elements"); } }