You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
780 B
24 lines
780 B
package de.superx.bianalysis; |
|
|
|
import java.io.File; |
|
import java.io.FileInputStream; |
|
import java.io.FileNotFoundException; |
|
import java.io.InputStream; |
|
|
|
import org.junit.Test; |
|
|
|
import de.superx.access.SqlAccessRestrictor; |
|
import de.superx.access.TestSqlRestrictionProvider; |
|
import net.sf.jsqlparser.JSQLParserException; |
|
|
|
public class JSqlParserTest { |
|
|
|
@Test |
|
public void parseSqlTest() throws FileNotFoundException, JSQLParserException { |
|
File testFile = new File("test/sql_parser_testfiles/file02.sql"); |
|
InputStream is = new FileInputStream(testFile); |
|
SqlAccessRestrictor sqlAccessRestrictor = new SqlAccessRestrictor(new TestSqlRestrictionProvider(), "linde", "bi_admin", 1); |
|
System.out.println(sqlAccessRestrictor.restrictSql(is)); |
|
} |
|
|
|
}
|
|
|