@Test public void clickingBearingButtonForLong_whenSensorIsAvailable_callsOnLongClickListener() { BearingWidget widget = createWidget(promptWithAnswer(null)); widget.setOnLongClickListener(listener); widget.binding.bearingButton.performLongClick(); verify(listener).onLongClick(widget.binding.bearingButton); }
@Override public void setOnLongClickListener(OnLongClickListener l) { binding.bearingButton.setOnLongClickListener(l); binding.answerText.setOnLongClickListener(l); }
BearingWidget extends QuestionWidget implements BinaryDataReceiver { @Override public void setOnLongClickListener(OnLongClickListener l) { binding.bearingButton.setOnLongClickListener(l); binding.answerText.setOnLongClickListener(l); } }
BearingWidget extends QuestionWidget implements BinaryDataReceiver { @Override public void setOnLongClickListener(OnLongClickListener l) { binding.bearingButton.setOnLongClickListener(l); binding.answerText.setOnLongClickListener(l); } BearingWidget(Context context, QuestionDetails questionDetails, WaitingForDataRegistry waitingForDataRegistry, SensorManager sensorManager); }
BearingWidget extends QuestionWidget implements BinaryDataReceiver { @Override public void setOnLongClickListener(OnLongClickListener l) { binding.bearingButton.setOnLongClickListener(l); binding.answerText.setOnLongClickListener(l); } 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 setOnLongClickListener(OnLongClickListener l) { binding.bearingButton.setOnLongClickListener(l); binding.answerText.setOnLongClickListener(l); } 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();  }