Skip to content

Commit b33379f

Browse files
author
Vincent Potucek
committed
fix SQLTokenizedFormatter
1 parent 3b9f887 commit b33379f

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lib/src/test/java/com/diffplug/spotless/sql/dbeaver/SQLTokenizedFormatterTest.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,21 @@
55
import org.junit.jupiter.api.BeforeEach;
66
import org.junit.jupiter.api.Test;
77

8+
import java.util.Properties;
9+
810
class SQLTokenizedFormatterTest {
911
private SQLTokenizedFormatter formatter;
1012

13+
1114
@BeforeEach
1215
void setUp() {
13-
DBeaverSQLFormatterConfiguration config = new DBeaverSQLFormatterConfiguration();
14-
config.setStatementDelimiter(";");
15-
config.setKeywordCase(DBeaverSQLFormatterConfiguration.KeywordCase.UPPER);
16+
Properties properties = new Properties();
17+
properties.setProperty("sql.formatter.keyword.case", "UPPER");
18+
properties.setProperty("sql.formatter.statement.delimiter", ";");
19+
properties.setProperty("sql.formatter.indent.type", "space");
20+
properties.setProperty("sql.formatter.indent.size", "4");
21+
22+
DBeaverSQLFormatterConfiguration config = new DBeaverSQLFormatterConfiguration(properties);
1623
formatter = new SQLTokenizedFormatter(config);
1724
}
1825

0 commit comments

Comments
 (0)