69
69
import org .springframework .jdbc .datasource .SimpleDriverDataSource ;
70
70
import org .springframework .jdbc .datasource .TransactionAwareDataSourceProxy ;
71
71
72
- public class DomaAutoConfigurationTest {
72
+ class DomaAutoConfigurationTest {
73
73
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner ()
74
74
.withConfiguration (AutoConfigurations .of (DomaAutoConfiguration .class ,
75
75
DataSourceAutoConfiguration .class ));
76
76
77
77
@ Test
78
- public void testAutoRegisteredConfig () {
78
+ void testAutoRegisteredConfig () {
79
79
this .contextRunner
80
80
.run (context -> {
81
81
Config config = context .getBean (Config .class );
@@ -104,7 +104,7 @@ public void testAutoRegisteredConfig() {
104
104
}
105
105
106
106
@ Test
107
- public void testConfigWithDomaConfigBuilder () {
107
+ void testConfigWithDomaConfigBuilder () {
108
108
this .contextRunner
109
109
.withUserConfiguration (ConfigBuilderConfigure .class )
110
110
.run (context -> {
@@ -135,7 +135,7 @@ public void testConfigWithDomaConfigBuilder() {
135
135
}
136
136
137
137
@ Test
138
- public void testConfigWithConfig () {
138
+ void testConfigWithConfig () {
139
139
this .contextRunner
140
140
.withUserConfiguration (ConfigConfigure .class )
141
141
.run (context -> {
@@ -166,7 +166,7 @@ public void testConfigWithConfig() {
166
166
}
167
167
168
168
@ Test
169
- public void testExceptionTranslationEnabledSpecifyFalse () {
169
+ void testExceptionTranslationEnabledSpecifyFalse () {
170
170
this .contextRunner
171
171
.withPropertyValues ("doma.exception-translation-enabled=false" )
172
172
.run (context -> {
@@ -176,7 +176,7 @@ public void testExceptionTranslationEnabledSpecifyFalse() {
176
176
}
177
177
178
178
@ Test
179
- public void testExceptionTranslationEnabledSpecifyTrue () {
179
+ void testExceptionTranslationEnabledSpecifyTrue () {
180
180
this .contextRunner
181
181
.withPropertyValues ("doma.exception-translation-enabled=true" )
182
182
.run (context -> {
@@ -188,7 +188,7 @@ public void testExceptionTranslationEnabledSpecifyTrue() {
188
188
}
189
189
190
190
@ Test
191
- public void testChangeDialect () {
191
+ void testChangeDialect () {
192
192
this .contextRunner
193
193
.withPropertyValues ("doma.dialect=MYSQL" )
194
194
.run (context -> {
@@ -198,7 +198,7 @@ public void testChangeDialect() {
198
198
}
199
199
200
200
@ Test
201
- public void testChangeMaxRows () {
201
+ void testChangeMaxRows () {
202
202
this .contextRunner
203
203
.withPropertyValues ("doma.max-rows=100" )
204
204
.run (context -> {
@@ -208,7 +208,7 @@ public void testChangeMaxRows() {
208
208
}
209
209
210
210
@ Test
211
- public void testSQLExceptionTranslator () {
211
+ void testSQLExceptionTranslator () {
212
212
this .contextRunner
213
213
.run (context -> {
214
214
PersistenceExceptionTranslator translator = context
@@ -242,7 +242,7 @@ public void testSQLExceptionTranslator() {
242
242
}
243
243
244
244
@ Test
245
- public void testAutoRegisteredCriteriaAPI () {
245
+ void testAutoRegisteredCriteriaAPI () {
246
246
this .contextRunner
247
247
.run (context -> {
248
248
Entityql entityql = context .getBean (Entityql .class );
@@ -253,7 +253,7 @@ public void testAutoRegisteredCriteriaAPI() {
253
253
}
254
254
255
255
@ Test
256
- public void testCriteriaAPIWithConfig () {
256
+ void testCriteriaAPIWithConfig () {
257
257
this .contextRunner
258
258
.withUserConfiguration (MyCriteriaAPIConfig .class )
259
259
.run (context -> {
@@ -267,7 +267,7 @@ public void testCriteriaAPIWithConfig() {
267
267
}
268
268
269
269
@ Test
270
- public void testDialectByDataSourceUrl () {
270
+ void testDialectByDataSourceUrl () {
271
271
this .contextRunner
272
272
.withPropertyValues (
273
273
"spring.datasource.url=jdbc:postgresql://localhost:1234/example" ,
@@ -279,7 +279,7 @@ public void testDialectByDataSourceUrl() {
279
279
}
280
280
281
281
@ Test
282
- public void testDialectByJdbConnectionDetails () {
282
+ void testDialectByJdbConnectionDetails () {
283
283
this .contextRunner
284
284
.withPropertyValues (
285
285
"doma.exception-translation-enabled=false" /* prevent database connections */ )
@@ -306,7 +306,7 @@ public String getJdbcUrl() {
306
306
}
307
307
308
308
@ Test
309
- public void testDialectMissingJdbConnectionDetails () {
309
+ void testDialectMissingJdbConnectionDetails () {
310
310
this .contextRunner
311
311
.withPropertyValues (
312
312
"doma.exception-translation-enabled=false" /* prevent database connections */ )
@@ -319,7 +319,7 @@ public void testDialectMissingJdbConnectionDetails() {
319
319
}
320
320
321
321
@ Test
322
- public void testDialectMissingJdbConnectionDetailsExplicitDialect () {
322
+ void testDialectMissingJdbConnectionDetailsExplicitDialect () {
323
323
this .contextRunner
324
324
.withPropertyValues (
325
325
"doma.dialect=POSTGRES" ,
@@ -333,7 +333,7 @@ public void testDialectMissingJdbConnectionDetailsExplicitDialect() {
333
333
}
334
334
335
335
@ Test
336
- public void testDialectByDomaPropertiesIgnoreDataSourceUrl () {
336
+ void testDialectByDomaPropertiesIgnoreDataSourceUrl () {
337
337
this .contextRunner
338
338
.withPropertyValues (
339
339
"spring.datasource.url=jdbc:h2:mem:example" ,
@@ -346,7 +346,7 @@ public void testDialectByDomaPropertiesIgnoreDataSourceUrl() {
346
346
}
347
347
348
348
@ Test
349
- public void testJdbcLoggerSlf4J () {
349
+ void testJdbcLoggerSlf4J () {
350
350
this .contextRunner
351
351
.withPropertyValues ("doma.jdbcLogger=SLF4J" )
352
352
@@ -357,7 +357,7 @@ public void testJdbcLoggerSlf4J() {
357
357
}
358
358
359
359
@ Test
360
- public void testAutoRegisteredQueryDsl () {
360
+ void testAutoRegisteredQueryDsl () {
361
361
this .contextRunner
362
362
363
363
.run (context -> {
@@ -367,7 +367,7 @@ public void testAutoRegisteredQueryDsl() {
367
367
}
368
368
369
369
@ Test
370
- public void testQueryDslWithConfig () {
370
+ void testQueryDslWithConfig () {
371
371
this .contextRunner
372
372
.withUserConfiguration (MyQueryDslConfig .class )
373
373
@@ -379,7 +379,7 @@ public void testQueryDslWithConfig() {
379
379
}
380
380
381
381
@ Test
382
- public void testThrowExceptionIfDuplicateColumn () {
382
+ void testThrowExceptionIfDuplicateColumn () {
383
383
this .contextRunner
384
384
.withPropertyValues ("doma.throw-exception-if-duplicate-column=true" )
385
385
@@ -391,7 +391,7 @@ public void testThrowExceptionIfDuplicateColumn() {
391
391
}
392
392
393
393
@ Test
394
- public void testCustomizeShouldRemoveBlockComment () {
394
+ void testCustomizeShouldRemoveBlockComment () {
395
395
Predicate <String > predicate = mock (Predicate .class );
396
396
when (predicate .test (anyString ())).thenReturn (true );
397
397
@@ -411,7 +411,7 @@ public void testCustomizeShouldRemoveBlockComment() {
411
411
}
412
412
413
413
@ Test
414
- public void testCustomizeShouldRemoveLineComment () {
414
+ void testCustomizeShouldRemoveLineComment () {
415
415
Predicate <String > predicate = mock (Predicate .class );
416
416
when (predicate .test (anyString ())).thenReturn (true );
417
417
@@ -431,7 +431,7 @@ public void testCustomizeShouldRemoveLineComment() {
431
431
}
432
432
433
433
@ Test
434
- public void testAnonymousPredicateAreNotAffected () {
434
+ void testAnonymousPredicateAreNotAffected () {
435
435
Predicate <String > predicate = mock (Predicate .class );
436
436
when (predicate .test (anyString ())).thenReturn (true );
437
437
@@ -450,7 +450,7 @@ public void testAnonymousPredicateAreNotAffected() {
450
450
}
451
451
452
452
@ Test
453
- public void testShouldRemoveBlankLinesDefaultValue () {
453
+ void testShouldRemoveBlankLinesDefaultValue () {
454
454
this .contextRunner
455
455
456
456
.run (context -> {
@@ -460,7 +460,7 @@ public void testShouldRemoveBlankLinesDefaultValue() {
460
460
}
461
461
462
462
@ Test
463
- public void testShouldRemoveBlankLinesChangedValue () {
463
+ void testShouldRemoveBlankLinesChangedValue () {
464
464
this .contextRunner
465
465
.withPropertyValues ("doma.sql-builder-settings.should-remove-blank-lines=true" )
466
466
@@ -471,7 +471,7 @@ public void testShouldRemoveBlankLinesChangedValue() {
471
471
}
472
472
473
473
@ Test
474
- public void testShouldRequireInListPaddingDefaultValue () {
474
+ void testShouldRequireInListPaddingDefaultValue () {
475
475
this .contextRunner
476
476
477
477
.run (context -> {
@@ -481,7 +481,7 @@ public void testShouldRequireInListPaddingDefaultValue() {
481
481
}
482
482
483
483
@ Test
484
- public void testShouldRequireInListPaddingChangedValue () {
484
+ void testShouldRequireInListPaddingChangedValue () {
485
485
this .contextRunner
486
486
.withPropertyValues ("doma.sql-builder-settings.should-require-in-list-padding=true" )
487
487
@@ -492,7 +492,7 @@ public void testShouldRequireInListPaddingChangedValue() {
492
492
}
493
493
494
494
@ Test
495
- public void testStatisticManagerDefaultValue () {
495
+ void testStatisticManagerDefaultValue () {
496
496
this .contextRunner
497
497
498
498
.run (context -> {
@@ -502,7 +502,7 @@ public void testStatisticManagerDefaultValue() {
502
502
}
503
503
504
504
@ Test
505
- public void testStatisticManagerChangedValue () {
505
+ void testStatisticManagerChangedValue () {
506
506
this .contextRunner
507
507
.withPropertyValues ("doma.statistic-manager.enabled=true" )
508
508
0 commit comments