|
9 | 9 | */ |
10 | 10 | package net.sf.jsqlparser.expression.operators.relational; |
11 | 11 |
|
| 12 | +import static org.junit.jupiter.api.Assertions.*; |
| 13 | + |
12 | 14 | import net.sf.jsqlparser.JSQLParserException; |
13 | 15 | import net.sf.jsqlparser.expression.Expression; |
14 | 16 | import net.sf.jsqlparser.expression.StringValue; |
15 | 17 | import net.sf.jsqlparser.parser.CCJSqlParserUtil; |
16 | 18 | import net.sf.jsqlparser.test.TestUtils; |
17 | 19 | import org.junit.jupiter.api.Test; |
18 | 20 |
|
19 | | -import static org.junit.jupiter.api.Assertions.*; |
20 | | - |
21 | 21 | /** |
22 | 22 | * |
23 | 23 | * @author Tobias Warneke (t.warneke@gmx.net) |
@@ -61,31 +61,41 @@ void testDuckDBSimuilarTo() throws JSQLParserException { |
61 | 61 |
|
62 | 62 | @Test |
63 | 63 | public void testMatchAny() throws JSQLParserException { |
64 | | - TestUtils.assertSqlCanBeParsedAndDeparsed("select * from dual where v MATCH_ANY 'keyword1 keyword2'", true); |
65 | | - TestUtils.assertSqlCanBeParsedAndDeparsed("select * from dual where v NOT MATCH_ANY 'keyword1 keyword2'", true); |
| 64 | + TestUtils.assertSqlCanBeParsedAndDeparsed( |
| 65 | + "select * from dual where v MATCH_ANY 'keyword1 keyword2'", true); |
| 66 | + TestUtils.assertSqlCanBeParsedAndDeparsed( |
| 67 | + "select * from dual where v NOT MATCH_ANY 'keyword1 keyword2'", true); |
66 | 68 | } |
67 | 69 |
|
68 | 70 | @Test |
69 | 71 | public void testMatchAll() throws JSQLParserException { |
70 | | - TestUtils.assertSqlCanBeParsedAndDeparsed("select * from dual where v MATCH_ALL 'keyword1 keyword2'", true); |
71 | | - TestUtils.assertSqlCanBeParsedAndDeparsed("select * from dual where v NOT MATCH_ALL 'keyword1 keyword2'", true); |
| 72 | + TestUtils.assertSqlCanBeParsedAndDeparsed( |
| 73 | + "select * from dual where v MATCH_ALL 'keyword1 keyword2'", true); |
| 74 | + TestUtils.assertSqlCanBeParsedAndDeparsed( |
| 75 | + "select * from dual where v NOT MATCH_ALL 'keyword1 keyword2'", true); |
72 | 76 | } |
73 | 77 |
|
74 | 78 | @Test |
75 | 79 | public void testMatchPhrase() throws JSQLParserException { |
76 | | - TestUtils.assertSqlCanBeParsedAndDeparsed("select * from dual where v MATCH_PHRASE 'keyword1 keyword2'", true); |
77 | | - TestUtils.assertSqlCanBeParsedAndDeparsed("select * from dual where v NOT MATCH_PHRASE 'keyword1 keyword2'", true); |
| 80 | + TestUtils.assertSqlCanBeParsedAndDeparsed( |
| 81 | + "select * from dual where v MATCH_PHRASE 'keyword1 keyword2'", true); |
| 82 | + TestUtils.assertSqlCanBeParsedAndDeparsed( |
| 83 | + "select * from dual where v NOT MATCH_PHRASE 'keyword1 keyword2'", true); |
78 | 84 | } |
79 | 85 |
|
80 | 86 | @Test |
81 | 87 | public void testMatchPhrasePrefix() throws JSQLParserException { |
82 | | - TestUtils.assertSqlCanBeParsedAndDeparsed("select * from dual where v MATCH_PHRASE_PREFIX 'keyword1 keyword2'", true); |
83 | | - TestUtils.assertSqlCanBeParsedAndDeparsed("select * from dual where v NOT MATCH_PHRASE_PREFIX 'keyword1 keyword2'", true); |
| 88 | + TestUtils.assertSqlCanBeParsedAndDeparsed( |
| 89 | + "select * from dual where v MATCH_PHRASE_PREFIX 'keyword1 keyword2'", true); |
| 90 | + TestUtils.assertSqlCanBeParsedAndDeparsed( |
| 91 | + "select * from dual where v NOT MATCH_PHRASE_PREFIX 'keyword1 keyword2'", true); |
84 | 92 | } |
85 | 93 |
|
86 | 94 | @Test |
87 | 95 | public void testMatchRegexp() throws JSQLParserException { |
88 | | - TestUtils.assertSqlCanBeParsedAndDeparsed("select * from dual where v MATCH_REGEXP 'keyword1 keyword2'", true); |
89 | | - TestUtils.assertSqlCanBeParsedAndDeparsed("select * from dual where v NOT MATCH_REGEXP 'keyword1 keyword2'", true); |
| 96 | + TestUtils.assertSqlCanBeParsedAndDeparsed( |
| 97 | + "select * from dual where v MATCH_REGEXP 'keyword1 keyword2'", true); |
| 98 | + TestUtils.assertSqlCanBeParsedAndDeparsed( |
| 99 | + "select * from dual where v NOT MATCH_REGEXP 'keyword1 keyword2'", true); |
90 | 100 | } |
91 | 101 | } |
0 commit comments