@Test public void setData_callsValueChangeListeners() { BearingWidget widget = createWidget(promptWithAnswer(null)); WidgetValueChangedListener valueChangedListener = mockValueChangedListener(widget); widget.setBinaryData("blah"); verify(valueChangedListener).widgetValueChanged(widget); }
@Override public void setBinaryData(Object answer) { binding.answerText.setText((String) answer); binding.bearingButton.setText(getContext().getString(R.string.replace_bearing)); widgetValueChanged(); }
BearingWidget extends QuestionWidget implements BinaryDataReceiver { @Override public void setBinaryData(Object answer) { binding.answerText.setText((String) answer); binding.bearingButton.setText(getContext().getString(R.string.replace_bearing)); widgetValueChanged(); } }
BearingWidget extends QuestionWidget implements BinaryDataReceiver { @Override public void setBinaryData(Object answer) { binding.answerText.setText((String) answer); binding.bearingButton.setText(getContext().getString(R.string.replace_bearing)); widgetValueChanged(); } BearingWidget(Context context, QuestionDetails questionDetails, WaitingForDataRegistry waitingForDataRegistry, SensorManager sensorManager); }
BearingWidget extends QuestionWidget implements BinaryDataReceiver { @Override public void setBinaryData(Object answer) { binding.answerText.setText((String) answer); binding.bearingButton.setText(getContext().getString(R.string.replace_bearing)); widgetValueChanged(); } BearingWidget(Context context, QuestionDetails questionDetails, WaitingForDataRegistry waitingForDataRegistry, SensorManager sensorManager); @Override void clearAnswer(); @Override IAnswerData getAnswer(); @Override void setBinaryData(Object answer); @Override void setOnLongClickListener(OnLongClickListener l); @Override void cancelLongPress(); }
BearingWidget extends QuestionWidget implements BinaryDataReceiver { @Override public void setBinaryData(Object answer) { binding.answerText.setText((String) answer); binding.bearingButton.setText(getContext().getString(R.string.replace_bearing)); widgetValueChanged(); } BearingWidget(Context context, QuestionDetails questionDetails, WaitingForDataRegistry waitingForDataRegistry, SensorManager sensorManager); @Override void clearAnswer(); @Override IAnswerData getAnswer(); @Override void setBinaryData(Object answer); @Override void setOnLongClickListener(OnLongClickListener l); @Override void cancelLongPress();  }