FileUploadEditor implements IsWidget, LeafAttributeEditor<String> { String getUploadFileName() { assert callback != null; return callback.getUploadFileName(); } @Inject  FileUploadEditor(final Event<org.dashbuilder.common.client.event.ValueChangeEvent<String>> valueChangeEvent,
                            final Event<NotificationEvent> workbenchNotification,
                            final View view); @PostConstruct void init(); void configure(final String fileUploadName, final FileUploadEditorCallback callback); void addHelpContent(final String title, final String content, final Placement placement); @Override void showErrors(List<EditorError> errors); @Override Widget asWidget(); @Override void setValue(final String value); @Override String getValue(); void setAccept(String type); public View view; }
@Test public void testGetUploadFileName() throws Exception { FileUploadEditor.FileUploadEditorCallback callback = mock(FileUploadEditor.FileUploadEditorCallback.class); presenter.callback = callback; presenter.getUploadFileName(); verify(callback, times(1)).getUploadFileName(); verify(callback, times(0)).getUploadFileUrl(); }