List of usage examples for org.apache.commons.io.filefilter RegexFileFilter accept
public boolean accept(File file)
From source file:org.bonitasoft.platform.setup.command.configure.BundleConfiguratorTest.java
@Test public void getDriverFilter_should_detect_Oracle_drivers() { // when:// ww w. j a v a 2 s . co m final RegexFileFilter driverFilter = configurator.getDriverFilter("oracle"); // then: assertThat(driverFilter.accept(new File("myFavoriteOjdbc1.4drivers.JAR"))).isTrue(); assertThat(driverFilter.accept(new File("OraCLE-4.jar"))).isTrue(); assertThat(driverFilter.accept(new File("OraCLE.zip"))).isTrue(); assertThat(driverFilter.accept(new File("OJdbc-1.4.2.ZIP"))).isTrue(); }
From source file:org.bonitasoft.platform.setup.command.configure.BundleConfiguratorTest.java
@Test public void getDriverFilter_should_detect_Postgres_drivers() { // when:// w w w. ja v a2s. c om final RegexFileFilter driverFilter = configurator.getDriverFilter("postgres"); // then: assertThat(driverFilter.accept(new File("postgres.JAR"))).isTrue(); assertThat(driverFilter.accept(new File("POSTGRESsql-5.jar"))).isTrue(); assertThat(driverFilter.accept(new File("drivers_postgres.LAST.zip"))).isTrue(); }
From source file:org.bonitasoft.platform.setup.command.configure.BundleConfiguratorTest.java
@Test public void getDriverFilter_should_detect_SQLSERVER_drivers() { // when://from w w w . j a v a 2s.com final RegexFileFilter driverFilter = configurator.getDriverFilter("sqlserver"); // then: assertThat(driverFilter.accept(new File("sqlserver.JAR"))).isTrue(); assertThat(driverFilter.accept(new File("SQLSERVER-5.jar"))).isTrue(); assertThat(driverFilter.accept(new File("drivers_SQLServer.zip"))).isTrue(); assertThat(driverFilter.accept(new File("old-sqljdbc.jar"))).isTrue(); assertThat(driverFilter.accept(new File("sqljdbc.jar"))).isTrue(); assertThat(driverFilter.accept(new File("sqljdbc4.jar"))).isTrue(); assertThat(driverFilter.accept(new File("sqljdbc41.jar"))).isTrue(); assertThat(driverFilter.accept(new File("sqljdbc42.jar"))).isTrue(); assertThat(driverFilter.accept(new File("mssql-jdbc-6.2.1.jre8.jar"))).isTrue(); }
From source file:org.bonitasoft.platform.setup.command.configure.BundleConfiguratorTest.java
@Test public void getDriverFilter_should_detect_MySQL_drivers() { // when:/* ww w . j a va 2 s .co m*/ final RegexFileFilter driverFilter = configurator.getDriverFilter("mysql"); // then: assertThat(driverFilter.accept(new File("MySQL.JAR"))).isTrue(); assertThat(driverFilter.accept(new File("mySQL-5.jar"))).isTrue(); assertThat(driverFilter.accept(new File("drivers_mysql.zIp"))).isTrue(); }
From source file:org.bonitasoft.platform.setup.command.configure.BundleConfiguratorTest.java
@Test public void getDriverFilter_should_detect_H2_drivers() { // when:/*from w w w .java 2s . c om*/ final RegexFileFilter driverFilter = configurator.getDriverFilter("h2"); // then: assertThat(driverFilter.accept(new File("h2-1.4.JAR"))).isTrue(); assertThat(driverFilter.accept(new File("drivers-H2.ZIP"))).isTrue(); assertThat(driverFilter.accept(new File("my-custom-h2_package.jar"))).isTrue(); }