@Test public void createEMailBodyTest() { createController(); controller.nameField.setText("name"); controller.emailField.setText("email"); controller.feedbackField.setText("feedback"); controller.handleSendButtonAction(); assertAsync(controller.nameField::getText, equalTo("")); assertAsync(controller.emailField::getText, equalTo("")); assertAsync(controller.feedbackField::getText, equalTo("")); }
@FXML void handleSendButtonAction() { new Thread() { @Override public void run() { try { reportHandler.sendFeedback(feedbackField.getText(), nameField.getText(), emailField.getText()); Platform.runLater(() -> { showThanksDialog(); feedbackField.setText(""); nameField.setText(""); emailField.setText(""); }); } catch (IOException e) { alert(e); } } }.start(); }
FeedbackController extends AbstractController implements Initializable { @FXML void handleSendButtonAction() { new Thread() { @Override public void run() { try { reportHandler.sendFeedback(feedbackField.getText(), nameField.getText(), emailField.getText()); Platform.runLater(() -> { showThanksDialog(); feedbackField.setText(""); nameField.setText(""); emailField.setText(""); }); } catch (IOException e) { alert(e); } } }.start(); } }
FeedbackController extends AbstractController implements Initializable { @FXML void handleSendButtonAction() { new Thread() { @Override public void run() { try { reportHandler.sendFeedback(feedbackField.getText(), nameField.getText(), emailField.getText()); Platform.runLater(() -> { showThanksDialog(); feedbackField.setText(""); nameField.setText(""); emailField.setText(""); }); } catch (IOException e) { alert(e); } } }.start(); }  }
FeedbackController extends AbstractController implements Initializable { @FXML void handleSendButtonAction() { new Thread() { @Override public void run() { try { reportHandler.sendFeedback(feedbackField.getText(), nameField.getText(), emailField.getText()); Platform.runLater(() -> { showThanksDialog(); feedbackField.setText(""); nameField.setText(""); emailField.setText(""); }); } catch (IOException e) { alert(e); } } }.start(); }  @Override void initialize(URL location, ResourceBundle resources); }
FeedbackController extends AbstractController implements Initializable { @FXML void handleSendButtonAction() { new Thread() { @Override public void run() { try { reportHandler.sendFeedback(feedbackField.getText(), nameField.getText(), emailField.getText()); Platform.runLater(() -> { showThanksDialog(); feedbackField.setText(""); nameField.setText(""); emailField.setText(""); }); } catch (IOException e) { alert(e); } } }.start(); }  @Override void initialize(URL location, ResourceBundle resources);  }