Skip to content

Commit 42818bf

Browse files
committed
Remove unnecessary public access modifier in tests
1 parent 72208ff commit 42818bf

File tree

19 files changed

+46
-47
lines changed

19 files changed

+46
-47
lines changed

src/test/java/org/apache/ibatis/binding/FlushTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
import org.junit.jupiter.api.BeforeAll;
3636
import org.junit.jupiter.api.Test;
3737

38-
public class FlushTest {
38+
class FlushTest {
3939
private static SqlSessionFactory sqlSessionFactory;
4040

4141
@BeforeAll
42-
public static void setup() throws Exception {
42+
static void setup() throws Exception {
4343
DataSource dataSource = BaseDataTest.createBlogDataSource();
4444
TransactionFactory transactionFactory = new JdbcTransactionFactory();
4545
Environment environment = new Environment("Production", transactionFactory, dataSource);
@@ -52,7 +52,7 @@ public static void setup() throws Exception {
5252
}
5353

5454
@Test
55-
public void invokeFlushStatementsViaMapper() {
55+
void invokeFlushStatementsViaMapper() {
5656
try (SqlSession session = sqlSessionFactory.openSession()) {
5757

5858
BoundAuthorMapper mapper = session.getMapper(BoundAuthorMapper.class);

src/test/java/org/apache/ibatis/builder/XmlMapperBuilderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ void shouldFailedLoadXMLMapperFile() throws Exception {
205205
// }
206206

207207
@Test
208-
public void erorrResultMapLocation() throws Exception {
208+
void erorrResultMapLocation() throws Exception {
209209
Configuration configuration = new Configuration();
210210
String resource = "org/apache/ibatis/builder/ProblemResultMapper.xml";
211211
try (InputStream inputStream = Resources.getResourceAsStream(resource)) {

src/test/java/org/apache/ibatis/datasource/unpooled/NetworkTimeoutTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2019 the original author or authors.
2+
* Copyright 2009-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -13,7 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
1716
package org.apache.ibatis.datasource.unpooled;
1817

1918
import static org.junit.jupiter.api.Assertions.*;
@@ -26,7 +25,7 @@
2625
import org.junit.jupiter.api.Test;
2726

2827
@Tag("TestcontainersTests")
29-
public class NetworkTimeoutTest {
28+
class NetworkTimeoutTest {
3029

3130
@Test
3231
void testNetworkTimeout_UnpooledDataSource() throws Exception {

src/test/java/org/apache/ibatis/executor/BaseExecutorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2019 the original author or authors.
2+
* Copyright 2009-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -373,7 +373,7 @@ void shouldFetchOneOrphanedPostWithNoBlog() throws Exception {
373373
}
374374

375375
@Test
376-
public void shouldFetchPostWithBlogWithCompositeKey() throws Exception {
376+
void shouldFetchPostWithBlogWithCompositeKey() throws Exception {
377377

378378
Executor executor = createExecutor(new JdbcTransaction(ds, null, false));
379379
try {

src/test/java/org/apache/ibatis/logging/jdbc/StatementLoggerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2019 the original author or authors.
2+
* Copyright 2009-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
3333
import org.mockito.junit.jupiter.MockitoExtension;
3434

3535
@ExtendWith(MockitoExtension.class)
36-
public class StatementLoggerTest {
36+
class StatementLoggerTest {
3737

3838
@Mock
3939
Statement statement;

src/test/java/org/apache/ibatis/parsing/XPathParserTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ private void testEvalMethod(XPathParser parser) {
195195
}
196196

197197
@Test
198-
public void formatXNodeToString() {
198+
void formatXNodeToString() {
199199
XPathParser parser = new XPathParser("<users><user><id>100</id><name>Tom</name><age>30</age><cars><car>BMW</car><car>Audi</car><car>Benz</car></cars></user></users>");
200200
String usersNodeToString = parser.evalNode("/users").toString();
201201
String userNodeToString = parser.evalNode("/users/user").toString();

src/test/java/org/apache/ibatis/reflection/ReflectorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public void setProp2(boolean arg) {}
224224
}
225225

226226
@Test
227-
public void shouldTwoGettersForNonBooleanPropertyThrowException() throws Exception {
227+
void shouldTwoGettersForNonBooleanPropertyThrowException() throws Exception {
228228
@SuppressWarnings("unused")
229229
class BeanClass {
230230
public Integer getProp1() {return 1;}
@@ -256,7 +256,7 @@ class BeanClass {
256256
}
257257

258258
@Test
259-
public void shouldTwoGettersWithDifferentTypesThrowException() throws Exception {
259+
void shouldTwoGettersWithDifferentTypesThrowException() throws Exception {
260260
@SuppressWarnings("unused")
261261
class BeanClass {
262262
public Integer getProp1() {return 1;}

src/test/java/org/apache/ibatis/scripting/xmltags/OgnlCacheTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
import org.junit.jupiter.api.Test;
3131

32-
public class OgnlCacheTest {
32+
class OgnlCacheTest {
3333
@Test
3434
void concurrentAccess() throws Exception {
3535
class DataClass {

src/test/java/org/apache/ibatis/session/SqlSessionManagerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ void shouldImplicitlyRollbackInsertedAuthor() {
100100
}
101101

102102
@Test
103-
public void shouldFindAllPostLites() throws Exception {
103+
void shouldFindAllPostLites() throws Exception {
104104
List<PostLite> posts = manager.selectList("org.apache.ibatis.domain.blog.mappers.PostMapper.selectPostLite");
105105
assertEquals(2, posts.size()); // old gcode issue #392, new #1848
106106
}
107107

108108
@Test
109-
public void shouldFindAllMutablePostLites() throws Exception {
109+
void shouldFindAllMutablePostLites() throws Exception {
110110
List<PostLite> posts = manager.selectList("org.apache.ibatis.domain.blog.mappers.PostMapper.selectMutablePostLite");
111111
assertEquals(2, posts.size()); // old gcode issue #392, new #1848
112112
}

src/test/java/org/apache/ibatis/submitted/array_type_handler/ArrayTypeHandlerTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2019 the original author or authors.
2+
* Copyright 2009-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,12 +28,12 @@
2828
import org.junit.jupiter.api.BeforeEach;
2929
import org.junit.jupiter.api.Test;
3030

31-
public class ArrayTypeHandlerTest {
31+
class ArrayTypeHandlerTest {
3232

3333
private SqlSessionFactory sqlSessionFactory;
3434

3535
@BeforeEach
36-
public void setUp() throws Exception {
36+
void setUp() throws Exception {
3737
try (Reader reader = Resources
3838
.getResourceAsReader("org/apache/ibatis/submitted/array_type_handler/mybatis-config.xml")) {
3939
sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader);
@@ -44,7 +44,7 @@ public void setUp() throws Exception {
4444
}
4545

4646
@Test
47-
public void shouldInsertArrayValue() throws Exception {
47+
void shouldInsertArrayValue() throws Exception {
4848
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
4949
User user = new User();
5050
user.setId(1);
@@ -64,7 +64,7 @@ public void shouldInsertArrayValue() throws Exception {
6464
}
6565

6666
@Test
67-
public void shouldInsertNullValue() throws Exception {
67+
void shouldInsertNullValue() throws Exception {
6868
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
6969
User user = new User();
7070
user.setId(1);

0 commit comments

Comments
 (0)