@Test public void testRenderForInputId() { assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> { fieldLabel.renderForInputId(null, fieldDefinition); }).withMessage("Parameter named 'inputId' should be not null!"); assertNeverRenderForInputId(); assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> { fieldLabel.renderForInputId(INPUT_ID, null); }).withMessage("Parameter named 'fieldDefinition' should be not null!"); assertNeverRenderForInputId(); fieldLabel.renderForInputId(INPUT_ID, fieldDefinition); verify(fieldDefinition).getLabel(); verify(fieldDefinition).getHelpMessage(); verify(fieldDefinition).getRequired(); verify(view).renderForInputId(INPUT_ID, FIELD_LABEL, FIELD_REQUIRED, FIELD_HELP); }
public void renderForInputId(String inputId, FieldDefinition fieldDefinition) { PortablePreconditions.checkNotNull("inputId", inputId); PortablePreconditions.checkNotNull("fieldDefinition", fieldDefinition); view.renderForInputId(inputId, fieldDefinition.getLabel(), fieldDefinition.getRequired(), fieldDefinition.getHelpMessage()); }
FieldLabel implements IsElement,
                                   FieldLabelView.Presenter { public void renderForInputId(String inputId, FieldDefinition fieldDefinition) { PortablePreconditions.checkNotNull("inputId", inputId); PortablePreconditions.checkNotNull("fieldDefinition", fieldDefinition); view.renderForInputId(inputId, fieldDefinition.getLabel(), fieldDefinition.getRequired(), fieldDefinition.getHelpMessage()); } }
FieldLabel implements IsElement,
                                   FieldLabelView.Presenter { public void renderForInputId(String inputId, FieldDefinition fieldDefinition) { PortablePreconditions.checkNotNull("inputId", inputId); PortablePreconditions.checkNotNull("fieldDefinition", fieldDefinition); view.renderForInputId(inputId, fieldDefinition.getLabel(), fieldDefinition.getRequired(), fieldDefinition.getHelpMessage()); } @Inject  FieldLabel(FieldLabelView view); }
FieldLabel implements IsElement,
                                   FieldLabelView.Presenter { public void renderForInputId(String inputId, FieldDefinition fieldDefinition) { PortablePreconditions.checkNotNull("inputId", inputId); PortablePreconditions.checkNotNull("fieldDefinition", fieldDefinition); view.renderForInputId(inputId, fieldDefinition.getLabel(), fieldDefinition.getRequired(), fieldDefinition.getHelpMessage()); } @Inject  FieldLabel(FieldLabelView view); void renderForInputId(String inputId,
                                 FieldDefinition fieldDefinition); void renderForInput(IsWidget isWidget,
                               FieldDefinition fieldDefinition); @Override HTMLElement getElement(); }
FieldLabel implements IsElement,
                                   FieldLabelView.Presenter { public void renderForInputId(String inputId, FieldDefinition fieldDefinition) { PortablePreconditions.checkNotNull("inputId", inputId); PortablePreconditions.checkNotNull("fieldDefinition", fieldDefinition); view.renderForInputId(inputId, fieldDefinition.getLabel(), fieldDefinition.getRequired(), fieldDefinition.getHelpMessage()); } @Inject  FieldLabel(FieldLabelView view); void renderForInputId(String inputId,
                                 FieldDefinition fieldDefinition); void renderForInput(IsWidget isWidget,
                               FieldDefinition fieldDefinition); @Override HTMLElement getElement();  }