Skip to content

Commit f796d82

Browse files
Make all test methods package-private
Co-Authored-By: [email protected] <[email protected]>
1 parent a8d0cd2 commit f796d82

File tree

5 files changed

+44
-44
lines changed

5 files changed

+44
-44
lines changed

doma-spring-boot-autoconfigure/src/test/java/org/seasar/doma/boot/autoconfigure/DomaAutoConfigurationTest.java

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void testAutoRegisteredConfig() {
104104
}
105105

106106
@Test
107-
public void testConfigWithDomaConfigBuilder() {
107+
void testConfigWithDomaConfigBuilder() {
108108
this.contextRunner
109109
.withUserConfiguration(ConfigBuilderConfigure.class)
110110
.run(context -> {
@@ -135,7 +135,7 @@ public void testConfigWithDomaConfigBuilder() {
135135
}
136136

137137
@Test
138-
public void testConfigWithConfig() {
138+
void testConfigWithConfig() {
139139
this.contextRunner
140140
.withUserConfiguration(ConfigConfigure.class)
141141
.run(context -> {
@@ -166,7 +166,7 @@ public void testConfigWithConfig() {
166166
}
167167

168168
@Test
169-
public void testExceptionTranslationEnabledSpecifyFalse() {
169+
void testExceptionTranslationEnabledSpecifyFalse() {
170170
this.contextRunner
171171
.withPropertyValues("doma.exception-translation-enabled=false")
172172
.run(context -> {
@@ -176,7 +176,7 @@ public void testExceptionTranslationEnabledSpecifyFalse() {
176176
}
177177

178178
@Test
179-
public void testExceptionTranslationEnabledSpecifyTrue() {
179+
void testExceptionTranslationEnabledSpecifyTrue() {
180180
this.contextRunner
181181
.withPropertyValues("doma.exception-translation-enabled=true")
182182
.run(context -> {
@@ -188,7 +188,7 @@ public void testExceptionTranslationEnabledSpecifyTrue() {
188188
}
189189

190190
@Test
191-
public void testChangeDialect() {
191+
void testChangeDialect() {
192192
this.contextRunner
193193
.withPropertyValues("doma.dialect=MYSQL")
194194
.run(context -> {
@@ -198,7 +198,7 @@ public void testChangeDialect() {
198198
}
199199

200200
@Test
201-
public void testChangeMaxRows() {
201+
void testChangeMaxRows() {
202202
this.contextRunner
203203
.withPropertyValues("doma.max-rows=100")
204204
.run(context -> {
@@ -208,7 +208,7 @@ public void testChangeMaxRows() {
208208
}
209209

210210
@Test
211-
public void testSQLExceptionTranslator() {
211+
void testSQLExceptionTranslator() {
212212
this.contextRunner
213213
.run(context -> {
214214
PersistenceExceptionTranslator translator = context
@@ -242,7 +242,7 @@ public void testSQLExceptionTranslator() {
242242
}
243243

244244
@Test
245-
public void testAutoRegisteredCriteriaAPI() {
245+
void testAutoRegisteredCriteriaAPI() {
246246
this.contextRunner
247247
.run(context -> {
248248
Entityql entityql = context.getBean(Entityql.class);
@@ -253,7 +253,7 @@ public void testAutoRegisteredCriteriaAPI() {
253253
}
254254

255255
@Test
256-
public void testCriteriaAPIWithConfig() {
256+
void testCriteriaAPIWithConfig() {
257257
this.contextRunner
258258
.withUserConfiguration(MyCriteriaAPIConfig.class)
259259
.run(context -> {
@@ -267,7 +267,7 @@ public void testCriteriaAPIWithConfig() {
267267
}
268268

269269
@Test
270-
public void testDialectByDataSourceUrl() {
270+
void testDialectByDataSourceUrl() {
271271
this.contextRunner
272272
.withPropertyValues(
273273
"spring.datasource.url=jdbc:postgresql://localhost:1234/example",
@@ -279,7 +279,7 @@ public void testDialectByDataSourceUrl() {
279279
}
280280

281281
@Test
282-
public void testDialectByJdbConnectionDetails() {
282+
void testDialectByJdbConnectionDetails() {
283283
this.contextRunner
284284
.withPropertyValues(
285285
"doma.exception-translation-enabled=false"/* prevent database connections */)
@@ -306,7 +306,7 @@ public String getJdbcUrl() {
306306
}
307307

308308
@Test
309-
public void testDialectMissingJdbConnectionDetails() {
309+
void testDialectMissingJdbConnectionDetails() {
310310
this.contextRunner
311311
.withPropertyValues(
312312
"doma.exception-translation-enabled=false"/* prevent database connections */)
@@ -319,7 +319,7 @@ public void testDialectMissingJdbConnectionDetails() {
319319
}
320320

321321
@Test
322-
public void testDialectMissingJdbConnectionDetailsExplicitDialect() {
322+
void testDialectMissingJdbConnectionDetailsExplicitDialect() {
323323
this.contextRunner
324324
.withPropertyValues(
325325
"doma.dialect=POSTGRES",
@@ -333,7 +333,7 @@ public void testDialectMissingJdbConnectionDetailsExplicitDialect() {
333333
}
334334

335335
@Test
336-
public void testDialectByDomaPropertiesIgnoreDataSourceUrl() {
336+
void testDialectByDomaPropertiesIgnoreDataSourceUrl() {
337337
this.contextRunner
338338
.withPropertyValues(
339339
"spring.datasource.url=jdbc:h2:mem:example",
@@ -346,7 +346,7 @@ public void testDialectByDomaPropertiesIgnoreDataSourceUrl() {
346346
}
347347

348348
@Test
349-
public void testJdbcLoggerSlf4J() {
349+
void testJdbcLoggerSlf4J() {
350350
this.contextRunner
351351
.withPropertyValues("doma.jdbcLogger=SLF4J")
352352

@@ -357,7 +357,7 @@ public void testJdbcLoggerSlf4J() {
357357
}
358358

359359
@Test
360-
public void testAutoRegisteredQueryDsl() {
360+
void testAutoRegisteredQueryDsl() {
361361
this.contextRunner
362362

363363
.run(context -> {
@@ -367,7 +367,7 @@ public void testAutoRegisteredQueryDsl() {
367367
}
368368

369369
@Test
370-
public void testQueryDslWithConfig() {
370+
void testQueryDslWithConfig() {
371371
this.contextRunner
372372
.withUserConfiguration(MyQueryDslConfig.class)
373373

@@ -379,7 +379,7 @@ public void testQueryDslWithConfig() {
379379
}
380380

381381
@Test
382-
public void testThrowExceptionIfDuplicateColumn() {
382+
void testThrowExceptionIfDuplicateColumn() {
383383
this.contextRunner
384384
.withPropertyValues("doma.throw-exception-if-duplicate-column=true")
385385

@@ -391,7 +391,7 @@ public void testThrowExceptionIfDuplicateColumn() {
391391
}
392392

393393
@Test
394-
public void testCustomizeShouldRemoveBlockComment() {
394+
void testCustomizeShouldRemoveBlockComment() {
395395
Predicate<String> predicate = mock(Predicate.class);
396396
when(predicate.test(anyString())).thenReturn(true);
397397

@@ -411,7 +411,7 @@ public void testCustomizeShouldRemoveBlockComment() {
411411
}
412412

413413
@Test
414-
public void testCustomizeShouldRemoveLineComment() {
414+
void testCustomizeShouldRemoveLineComment() {
415415
Predicate<String> predicate = mock(Predicate.class);
416416
when(predicate.test(anyString())).thenReturn(true);
417417

@@ -431,7 +431,7 @@ public void testCustomizeShouldRemoveLineComment() {
431431
}
432432

433433
@Test
434-
public void testAnonymousPredicateAreNotAffected() {
434+
void testAnonymousPredicateAreNotAffected() {
435435
Predicate<String> predicate = mock(Predicate.class);
436436
when(predicate.test(anyString())).thenReturn(true);
437437

@@ -450,7 +450,7 @@ public void testAnonymousPredicateAreNotAffected() {
450450
}
451451

452452
@Test
453-
public void testShouldRemoveBlankLinesDefaultValue() {
453+
void testShouldRemoveBlankLinesDefaultValue() {
454454
this.contextRunner
455455

456456
.run(context -> {
@@ -460,7 +460,7 @@ public void testShouldRemoveBlankLinesDefaultValue() {
460460
}
461461

462462
@Test
463-
public void testShouldRemoveBlankLinesChangedValue() {
463+
void testShouldRemoveBlankLinesChangedValue() {
464464
this.contextRunner
465465
.withPropertyValues("doma.sql-builder-settings.should-remove-blank-lines=true")
466466

@@ -471,7 +471,7 @@ public void testShouldRemoveBlankLinesChangedValue() {
471471
}
472472

473473
@Test
474-
public void testShouldRequireInListPaddingDefaultValue() {
474+
void testShouldRequireInListPaddingDefaultValue() {
475475
this.contextRunner
476476

477477
.run(context -> {
@@ -481,7 +481,7 @@ public void testShouldRequireInListPaddingDefaultValue() {
481481
}
482482

483483
@Test
484-
public void testShouldRequireInListPaddingChangedValue() {
484+
void testShouldRequireInListPaddingChangedValue() {
485485
this.contextRunner
486486
.withPropertyValues("doma.sql-builder-settings.should-require-in-list-padding=true")
487487

@@ -492,7 +492,7 @@ public void testShouldRequireInListPaddingChangedValue() {
492492
}
493493

494494
@Test
495-
public void testStatisticManagerDefaultValue() {
495+
void testStatisticManagerDefaultValue() {
496496
this.contextRunner
497497

498498
.run(context -> {
@@ -502,7 +502,7 @@ public void testStatisticManagerDefaultValue() {
502502
}
503503

504504
@Test
505-
public void testStatisticManagerChangedValue() {
505+
void testStatisticManagerChangedValue() {
506506
this.contextRunner
507507
.withPropertyValues("doma.statistic-manager.enabled=true")
508508

doma-spring-boot-core/src/test/java/org/seasar/doma/boot/DomaPersistenceExceptionTranslatorTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void testOccurNotJdbcException() {
4343
}
4444

4545
@Test
46-
public void testOccurSqlExecutionException() {
46+
void testOccurSqlExecutionException() {
4747
DataAccessException dataAccessException = translator
4848
.translateExceptionIfPossible(new SqlExecutionException(
4949
SqlLogType.FORMATTED, SqlKind.SELECT,
@@ -56,7 +56,7 @@ public void testOccurSqlExecutionException() {
5656
}
5757

5858
@Test
59-
public void testThrowOptimisticLockingFailureException() {
59+
void testThrowOptimisticLockingFailureException() {
6060
DataAccessException dataAccessException = translator
6161
.translateExceptionIfPossible(new OptimisticLockException(
6262
SqlLogType.FORMATTED,
@@ -68,7 +68,7 @@ public void testThrowOptimisticLockingFailureException() {
6868
}
6969

7070
@Test
71-
public void testThrowDuplicateKeyException() {
71+
void testThrowDuplicateKeyException() {
7272
DataAccessException dataAccessException = translator
7373
.translateExceptionIfPossible(new UniqueConstraintException(
7474
SqlLogType.FORMATTED,
@@ -80,7 +80,7 @@ public void testThrowDuplicateKeyException() {
8080
}
8181

8282
@Test
83-
public void testThrowIncorrectResultSizeDataAccessException() {
83+
void testThrowIncorrectResultSizeDataAccessException() {
8484
{
8585
DataAccessException dataAccessException = translator
8686
.translateExceptionIfPossible(new NonUniqueResultException(
@@ -103,7 +103,7 @@ public void testThrowIncorrectResultSizeDataAccessException() {
103103
}
104104

105105
@Test
106-
public void testThrowEmptyResultDataAccessException() {
106+
void testThrowEmptyResultDataAccessException() {
107107
DataAccessException dataAccessException = translator
108108
.translateExceptionIfPossible(new NoResultException(SqlLogType.FORMATTED,
109109
SqlKind.SELECT, "select * from todo where todo_id = ?",
@@ -113,7 +113,7 @@ public void testThrowEmptyResultDataAccessException() {
113113
}
114114

115115
@Test
116-
public void testThrowTypeMismatchDataAccessException() {
116+
void testThrowTypeMismatchDataAccessException() {
117117
{
118118
DataAccessException dataAccessException = translator
119119
.translateExceptionIfPossible(new UnknownColumnException(
@@ -139,7 +139,7 @@ public void testThrowTypeMismatchDataAccessException() {
139139
}
140140

141141
@Test
142-
public void testThrowUncategorizedDataAccessException() {
142+
void testThrowUncategorizedDataAccessException() {
143143
DataAccessException dataAccessException = translator
144144
.translateExceptionIfPossible(new ConfigException("DomaConfig",
145145
"configure"));

doma-spring-boot-core/src/test/java/org/seasar/doma/boot/UnifiedCriteriaPageableTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void testOffsetAndLimitWhenUnpaged() {
5757
}
5858

5959
@Test
60-
public void testOrderBy() {
60+
void testOrderBy() {
6161
Pageable pageable = PageRequest.of(0, 10, Sort.by("name").ascending());
6262
Person_ entity = new Person_();
6363
UnifiedCriteriaPageable p = UnifiedCriteriaPageable.of(
@@ -75,7 +75,7 @@ public void testOrderBy() {
7575
}
7676

7777
@Test
78-
public void testOrderBy2() {
78+
void testOrderBy2() {
7979
Pageable pageable = PageRequest.of(0, 10,
8080
Sort.by("name").descending().and(Sort.by("age").ascending()));
8181
Person_ entity = new Person_();
@@ -97,7 +97,7 @@ public void testOrderBy2() {
9797
}
9898

9999
@Test
100-
public void testOrderByWhenNonSort() {
100+
void testOrderByWhenNonSort() {
101101
Pageable pageable = PageRequest.of(0, 10);
102102
UnifiedCriteriaPageable p = UnifiedCriteriaPageable.of(
103103
pageable,
@@ -111,7 +111,7 @@ public void testOrderByWhenNonSort() {
111111
}
112112

113113
@Test
114-
public void testOrderByWhenNonSortAndSetDefault() {
114+
void testOrderByWhenNonSortAndSetDefault() {
115115
Pageable pageable = PageRequest.of(0, 10);
116116
Person_ entity = new Person_();
117117
Consumer<OrderByNameDeclaration> defaultOrder = c -> c.asc(entity.id);
@@ -126,7 +126,7 @@ public void testOrderByWhenNonSortAndSetDefault() {
126126
}
127127

128128
@Test
129-
public void testOrderBySingleEntity() {
129+
void testOrderBySingleEntity() {
130130
Pageable pageable = PageRequest.of(0, 10,
131131
Sort.by("name").descending().and(Sort.by("age").ascending()));
132132
Person_ entity = new Person_();
@@ -142,7 +142,7 @@ public void testOrderBySingleEntity() {
142142
}
143143

144144
@Test
145-
public void testOrderByWhenMissingProperties() {
145+
void testOrderByWhenMissingProperties() {
146146
Pageable pageable = PageRequest.of(0, 10,
147147
Sort.by("dog").and(Sort.by("name")).and(Sort.by("cat")));
148148
Person_ entity = new Person_();
@@ -156,7 +156,7 @@ public void testOrderByWhenMissingProperties() {
156156
}
157157

158158
@Test
159-
public void testOrderByWhenMissingAllProperties() {
159+
void testOrderByWhenMissingAllProperties() {
160160
Pageable pageable = PageRequest.of(0, 10,
161161
Sort.by("dog").and(Sort.by("cat")));
162162
Person_ entity = new Person_();
@@ -169,7 +169,7 @@ public void testOrderByWhenMissingAllProperties() {
169169
}
170170

171171
@Test
172-
public void testOrderByWhenMissingPropertiesHandle() {
172+
void testOrderByWhenMissingPropertiesHandle() {
173173
Pageable pageable = PageRequest.of(0, 10,
174174
Sort.by("dog").and(Sort.by("name")).and(Sort.by("cat")));
175175
Person_ entity = new Person_();

doma-spring-boot-core/src/test/java/org/seasar/doma/boot/event/DomaApplicationListenerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static class ConstructorTest {
2727

2828
@SuppressWarnings("unused")
2929
@Test
30-
public void entityOnly() throws Exception {
30+
void entityOnly() throws Exception {
3131
String beanName = "";
3232
Method method = EntityOnly.class.getDeclaredMethod("handle",
3333
TestEntity1.class);

doma-spring-boot-core/src/test/java/org/seasar/doma/boot/event/DomaEventEntityListenerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void handlePreUpdateWithContext() throws Exception {
104104
}
105105

106106
@Test
107-
public void handlePreDelete() throws Exception {
107+
void handlePreDelete() throws Exception {
108108
try (AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext()) {
109109
context.register(DomaEventEntityListener.class);
110110
context.register(DomaEventListenerFactory.class);

0 commit comments

Comments
 (0)