@Test public void saveButtonSwitchesLabels() throws Exception { controller.setPrivate(true); assertThat(controller.saveIdentity.getText(), equalTo("Save")); assertThat(controller.privateHint.getText(), equalTo("private description text")); assertThat(controller.privateLabel.getText(), equalTo("Private")); controller.setPrivate(false); assertThat(controller.saveIdentity.getText(), equalTo("Save & Publish")); assertThat(controller.privateHint.getText(), equalTo("private description text")); assertThat(controller.privateLabel.getText(), equalTo("Private")); }
void setPrivate(boolean isPrivate) { privateToggle.setSelected(isPrivate); }
IdentityEditController extends AbstractController implements Initializable { void setPrivate(boolean isPrivate) { privateToggle.setSelected(isPrivate); } }
IdentityEditController extends AbstractController implements Initializable { void setPrivate(boolean isPrivate) { privateToggle.setSelected(isPrivate); }  }
IdentityEditController extends AbstractController implements Initializable { void setPrivate(boolean isPrivate) { privateToggle.setSelected(isPrivate); }  @Override void initialize(URL location, ResourceBundle resources); void onFinish(Runnable finishHandler); }
IdentityEditController extends AbstractController implements Initializable { void setPrivate(boolean isPrivate) { privateToggle.setSelected(isPrivate); }  @Override void initialize(URL location, ResourceBundle resources); void onFinish(Runnable finishHandler);  }