Skip to content

Commit

Permalink
Cleaning up pom.xml and added test case for #25
Browse files Browse the repository at this point in the history
  • Loading branch information
mstahv committed Mar 16, 2017
1 parent ef58295 commit ca06763
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 31 deletions.
49 changes: 18 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.1</version>
<version>2.5.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand All @@ -55,7 +56,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<version>3.0.2</version>
<configuration>
<archive>
<manifest>
Expand Down Expand Up @@ -83,7 +84,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<version>3.0.1</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -142,7 +143,7 @@
<goal>compile</goal>
</goals>
<configuration>
<extraJvmArgs>-Xmx1G</extraJvmArgs>
<extraJvmArgs>-Xmx1G</extraJvmArgs>
<skip>${skipTests}</skip>
</configuration>
</execution>
Expand Down Expand Up @@ -294,46 +295,39 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.5</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.5</version>
</dependency>

<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
<version>${vaadin.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<version>7.2.2.v20101205</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.vaadin</groupId>
<artifactId>addon-test-helpers</artifactId>
<version>1.2</version>
<version>2.0.alpha5</version>
<scope>test</scope>
</dependency>

<!-- If you have testbench licence, use that instead of raw selenium. Much
more robust results -->
<dependency>
<!-- <dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-testbench</artifactId>
<version>3.0.4</version>
<scope>test</scope>
</dependency>
</dependency>-->

<!-- Open source alternative to TestBench -->
<!-- <dependency> -->
Expand All @@ -343,13 +337,6 @@
<!-- <scope>test</scope> -->
<!-- </dependency> -->


<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package org.vaadin.easyuploads.demoandtestapp;

import java.io.*;

import org.vaadin.easyuploads.*;
import com.vaadin.ui.*;
import org.vaadin.addonhelpers.AbstractTest;

public class MultiFileUploadWithMaxFiles1 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 receved");
}

};
multiFileUpload.setMaxFileCount(1);

multiFileUpload.setUploadButtonCaption("Upload files...");

layout.addComponent(multiFileUpload);

return layout;
}

}

0 comments on commit ca06763

Please sign in to comment.