Skip to content

Commit

Permalink
Test case for #25
Browse files Browse the repository at this point in the history
  • Loading branch information
mstahv committed Mar 17, 2017
1 parent 3d02159 commit 01cc00e
Showing 1 changed file with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package org.vaadin.easyuploads.demoandtestapp;

import com.vaadin.v7.data.Property;
import com.vaadin.ui.Button;
import com.vaadin.ui.Component;
import com.vaadin.ui.Notification;
import com.vaadin.ui.VerticalLayout;
import java.io.File;

import org.vaadin.easyuploads.*;

import org.vaadin.addonhelpers.AbstractTest;

public class MultiUploadWithMaxOneFiles extends AbstractTest {

@Override
public Component getTestComponent() {
VerticalLayout layout = new VerticalLayout();

MultiFileUpload multiFileUpload = new MultiFileUpload() {
@Override
protected void handleFile(File file, String fileName, String mimeType, long length) {
Notification.show("File handled");
}
};

multiFileUpload.setMaxFileCount(1);

layout.addComponent(multiFileUpload);

return layout;
}


}

0 comments on commit 01cc00e

Please sign in to comment.