@@ -180,9 +180,9 @@ void withStatementsWorks() {
180
180
assertThat (stringQuery .getProjection ()).isEqualToIgnoringCase ("day, value" );
181
181
assertThat (stringQuery .hasConstructorExpression ()).isFalse ();
182
182
183
- assertThat (queryEnhancer .createCountQueryFor ()). isEqualToIgnoringCase (
184
- "with sample_data (day, value) AS (VALUES ((0, 13), (1, 12), (2, 15), (3, 4), (4, 8), (5, 16))) "
185
- + "SELECT count(1) FROM sample_data AS a" );
183
+ assertThat (queryEnhancer .createCountQueryFor (). toLowerCase ()). isEqualToIgnoringWhitespace (
184
+ "with sample_data (day, value) as (values ((0, 13), (1, 12), (2, 15), (3, 4), (4, 8), (5, 16))) "
185
+ + "select count(1) from sample_data as a" );
186
186
assertThat (queryEnhancer .applySorting (Sort .by ("day" ).descending ())).endsWith ("ORDER BY a.day DESC" );
187
187
assertThat (queryEnhancer .getJoinAliases ()).isEmpty ();
188
188
assertThat (queryEnhancer .detectAlias ()).isEqualToIgnoringCase ("a" );
@@ -203,9 +203,9 @@ void multipleWithStatementsWorks() {
203
203
assertThat (stringQuery .getProjection ()).isEqualToIgnoringCase ("day, value" );
204
204
assertThat (stringQuery .hasConstructorExpression ()).isFalse ();
205
205
206
- assertThat (queryEnhancer .createCountQueryFor ()). isEqualToIgnoringCase (
207
- "with sample_data (day, value) AS (VALUES ((0, 13), (1, 12), (2, 15), (3, 4), (4, 8), (5, 16))), test2 AS (VALUES (1, 2, 3)) "
208
- + "SELECT count(1) FROM sample_data AS a" );
206
+ assertThat (queryEnhancer .createCountQueryFor (). toLowerCase ()). isEqualToIgnoringWhitespace (
207
+ "with sample_data (day, value) as (values ((0, 13), (1, 12), (2, 15), (3, 4), (4, 8), (5, 16))), test2 as (values (1, 2, 3)) "
208
+ + "select count(1) from sample_data as a" );
209
209
assertThat (queryEnhancer .applySorting (Sort .by ("day" ).descending ())).endsWith ("ORDER BY a.day DESC" );
210
210
assertThat (queryEnhancer .getJoinAliases ()).isEmpty ();
211
211
assertThat (queryEnhancer .detectAlias ()).isEqualToIgnoringCase ("a" );
0 commit comments