@Test public void testPrepareView() { final String type = "string"; final String constraint = "1,2,3"; doReturn(type).when(modal).getConstraintValueType(); doReturn(ENUMERATION).when(modal).getConstraintType(); doReturn(constraint).when(modal).getConstraintValue(); modal.prepareView(); verify(view).setType(type); verify(view).loadComponent(ENUMERATION); }
void prepareView() { getView().setType(getConstraintValueType()); if (!isEmpty(getConstraintValue()) || !isNone(getConstraintType())) { getView().loadComponent(getConstraintType()); } else { getView().setupEmptyContainer(); } }
DataTypeConstraintModal extends Elemental2Modal<DataTypeConstraintModal.View> { void prepareView() { getView().setType(getConstraintValueType()); if (!isEmpty(getConstraintValue()) || !isNone(getConstraintType())) { getView().loadComponent(getConstraintType()); } else { getView().setupEmptyContainer(); } } }
DataTypeConstraintModal extends Elemental2Modal<DataTypeConstraintModal.View> { void prepareView() { getView().setType(getConstraintValueType()); if (!isEmpty(getConstraintValue()) || !isNone(getConstraintType())) { getView().loadComponent(getConstraintType()); } else { getView().setupEmptyContainer(); } } @Inject  DataTypeConstraintModal(final View view,
                                   final DataTypeShortcuts dataTypeShortcuts,
                                   final DataTypeConstraintEnumeration constraintEnumeration,
                                   final DataTypeConstraintExpression constraintExpression,
                                   final DataTypeConstraintRange constraintRange); }
DataTypeConstraintModal extends Elemental2Modal<DataTypeConstraintModal.View> { void prepareView() { getView().setType(getConstraintValueType()); if (!isEmpty(getConstraintValue()) || !isNone(getConstraintType())) { getView().loadComponent(getConstraintType()); } else { getView().setupEmptyContainer(); } } @Inject  DataTypeConstraintModal(final View view,
                                   final DataTypeShortcuts dataTypeShortcuts,
                                   final DataTypeConstraintEnumeration constraintEnumeration,
                                   final DataTypeConstraintExpression constraintExpression,
                                   final DataTypeConstraintRange constraintRange); @PostConstruct void setup(); void save(); void show(final BiConsumer<String, ConstraintType> onSaveConsumer); @Override void hide(); void enableOkButton(); void disableOkButton(); }
DataTypeConstraintModal extends Elemental2Modal<DataTypeConstraintModal.View> { void prepareView() { getView().setType(getConstraintValueType()); if (!isEmpty(getConstraintValue()) || !isNone(getConstraintType())) { getView().loadComponent(getConstraintType()); } else { getView().setupEmptyContainer(); } } @Inject  DataTypeConstraintModal(final View view,
                                   final DataTypeShortcuts dataTypeShortcuts,
                                   final DataTypeConstraintEnumeration constraintEnumeration,
                                   final DataTypeConstraintExpression constraintExpression,
                                   final DataTypeConstraintRange constraintRange); @PostConstruct void setup(); void save(); void show(final BiConsumer<String, ConstraintType> onSaveConsumer); @Override void hide(); void enableOkButton(); void disableOkButton();  }