@Test public void testShow() { final Consumer consumer = mock(Consumer.class); final ServiceCallback serviceCallback = mock(ServiceCallback.class); final List<String> existingDataTypes = mock(List.class); doReturn(serviceCallback).when(modal).wrap(consumer); doReturn(consumer).when(modal).getConsumer(); doNothing().when(modal).superShow(); modal.show(existingDataTypes); verify(modal).superShow(); verify(client).loadDataObjects(serviceCallback); verify(view).hideDataTypeWithSameNameWarning(); }
public void show(final List<String> existingDataTypes) { getView().hideDataTypeWithSameNameWarning(); this.existingDataTypes = existingDataTypes; client.loadDataObjects(wrap(getConsumer())); superShow(); }
ImportDataObjectModal extends Elemental2Modal<ImportDataObjectModal.View> { public void show(final List<String> existingDataTypes) { getView().hideDataTypeWithSameNameWarning(); this.existingDataTypes = existingDataTypes; client.loadDataObjects(wrap(getConsumer())); superShow(); } }
ImportDataObjectModal extends Elemental2Modal<ImportDataObjectModal.View> { public void show(final List<String> existingDataTypes) { getView().hideDataTypeWithSameNameWarning(); this.existingDataTypes = existingDataTypes; client.loadDataObjects(wrap(getConsumer())); superShow(); } @Inject  ImportDataObjectModal(final View view,
                                 final DMNClientServicesProxy client); }
ImportDataObjectModal extends Elemental2Modal<ImportDataObjectModal.View> { public void show(final List<String> existingDataTypes) { getView().hideDataTypeWithSameNameWarning(); this.existingDataTypes = existingDataTypes; client.loadDataObjects(wrap(getConsumer())); superShow(); } @Inject  ImportDataObjectModal(final View view,
                                 final DMNClientServicesProxy client); Consumer<List<DataObject>> getDataObjectsConsumer(); void setup(final Consumer<List<DataObject>> dataObjectsConsumer); void hide(final List<DataObject> importedDataObjects); void show(final List<String> existingDataTypes); List<String> getExistingDataTypes(); }
ImportDataObjectModal extends Elemental2Modal<ImportDataObjectModal.View> { public void show(final List<String> existingDataTypes) { getView().hideDataTypeWithSameNameWarning(); this.existingDataTypes = existingDataTypes; client.loadDataObjects(wrap(getConsumer())); superShow(); } @Inject  ImportDataObjectModal(final View view,
                                 final DMNClientServicesProxy client); Consumer<List<DataObject>> getDataObjectsConsumer(); void setup(final Consumer<List<DataObject>> dataObjectsConsumer); void hide(final List<DataObject> importedDataObjects); void show(final List<String> existingDataTypes); List<String> getExistingDataTypes();  }