@Test public void testRenderForInput() { assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> { fieldLabel.renderForInput(null, fieldDefinition); }).withMessage("Parameter named 'isWidget' should be not null!"); assertNeverRenderForInput(); assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> { fieldLabel.renderForInput(isWidget, null); }).withMessage("Parameter named 'fieldDefinition' should be not null!"); assertNeverRenderForInput(); fieldLabel.renderForInput(isWidget, fieldDefinition); verify(fieldDefinition).getLabel(); verify(fieldDefinition).getHelpMessage(); verify(fieldDefinition).getRequired(); verify(view).renderForInput(isWidget, FIELD_LABEL, FIELD_REQUIRED, FIELD_HELP); }
public void renderForInput(IsWidget isWidget, FieldDefinition fieldDefinition) { PortablePreconditions.checkNotNull("fieldDefinition", fieldDefinition); PortablePreconditions.checkNotNull("isWidget", isWidget); view.renderForInput(isWidget, fieldDefinition.getLabel(), fieldDefinition.getRequired(), fieldDefinition.getHelpMessage()); }
FieldLabel implements IsElement,
                                   FieldLabelView.Presenter { public void renderForInput(IsWidget isWidget, FieldDefinition fieldDefinition) { PortablePreconditions.checkNotNull("fieldDefinition", fieldDefinition); PortablePreconditions.checkNotNull("isWidget", isWidget); view.renderForInput(isWidget, fieldDefinition.getLabel(), fieldDefinition.getRequired(), fieldDefinition.getHelpMessage()); } }
FieldLabel implements IsElement,
                                   FieldLabelView.Presenter { public void renderForInput(IsWidget isWidget, FieldDefinition fieldDefinition) { PortablePreconditions.checkNotNull("fieldDefinition", fieldDefinition); PortablePreconditions.checkNotNull("isWidget", isWidget); view.renderForInput(isWidget, fieldDefinition.getLabel(), fieldDefinition.getRequired(), fieldDefinition.getHelpMessage()); } @Inject  FieldLabel(FieldLabelView view); }
FieldLabel implements IsElement,
                                   FieldLabelView.Presenter { public void renderForInput(IsWidget isWidget, FieldDefinition fieldDefinition) { PortablePreconditions.checkNotNull("fieldDefinition", fieldDefinition); PortablePreconditions.checkNotNull("isWidget", isWidget); view.renderForInput(isWidget, 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 renderForInput(IsWidget isWidget, FieldDefinition fieldDefinition) { PortablePreconditions.checkNotNull("fieldDefinition", fieldDefinition); PortablePreconditions.checkNotNull("isWidget", isWidget); view.renderForInput(isWidget, 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();  }