### Question:
ScriptRunner implements FilenameFilter { public int run(final File file) throws IOException, SQLException { if (file.isDirectory()) { return run(file, file.list(this)); } else { return runFile(file); } } ScriptRunner(final Connection connection); String getEncoding(); void setEncoding(final String encoding); @Override boolean accept(final File directory, final String name); int run(final File file); final int run(final InputStream in); final int run(final LineNumberReader in); final int run(final String statement); void close(final boolean vacuum); String getCurrentPosition(); @Override String toString(); static final char END_OF_STATEMENT; static final char QUOTE; static final char IDENTIFIER_QUOTE; }### Answer:
@Test public void testSingleVersion() throws SQLException, IOException { final Runner runner = new Runner(); assertEquals(3, runner.run(null, new String[] { "EPSG_v6_14.mdb_Data_PostgreSQL.sql", "EPSG_v6_14.mdb_FKeys_PostgreSQL.sql", "EPSG_v6_14.mdb_Tables_PostgreSQL.sql" })); assertArrayEquals(new String[] { "EPSG_v6_14.mdb_Tables_PostgreSQL.sql", "EPSG_v6_14.mdb_Data_PostgreSQL.sql", "EPSG_v6_14.mdb_FKeys_PostgreSQL.sql" }, runner.getFiles()); }
@Test public void testMultipleVersion() throws SQLException, IOException { final Runner runner = new Runner(); assertEquals(3, runner.run(null, new String[] { "EPSG_v6_14.mdb_Data_PostgreSQL.sql", "EPSG_v6_14.mdb_FKeys_PostgreSQL.sql", "EPSG_v6_14.mdb_Tables_PostgreSQL.sql", "EPSG_v6_18.mdb_Data_PostgreSQL.sql", "EPSG_v6_18.mdb_FKeys_PostgreSQL.sql", "EPSG_v6_18.mdb_Tables_PostgreSQL.sql" })); assertArrayEquals(new String[] { "EPSG_v6_18.mdb_Tables_PostgreSQL.sql", "EPSG_v6_18.mdb_Data_PostgreSQL.sql", "EPSG_v6_18.mdb_FKeys_PostgreSQL.sql" }, runner.getFiles()); }