Skip to content

Commit 9804c8c

Browse files
authored
Merge pull request #1557 from hazendaz/master
[tests] Replace constructor in proxy test with static before all
2 parents df731d2 + 88a48ec commit 9804c8c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/test/java/org/apache/ibatis/executor/loader/CglibProxyTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@
2727
import org.apache.ibatis.reflection.factory.DefaultObjectFactory;
2828
import org.apache.ibatis.session.Configuration;
2929
import org.junit.jupiter.api.Assertions;
30+
import org.junit.jupiter.api.BeforeAll;
3031
import org.junit.jupiter.api.Test;
3132

3233
import static org.junit.jupiter.api.Assertions.*;
3334

3435
class CglibProxyTest extends SerializableProxyTest {
3536

36-
CglibProxyTest() {
37+
@BeforeAll
38+
static void createProxyFactory() {
3739
proxyFactory = new CglibProxyFactory();
3840
}
3941

src/test/java/org/apache/ibatis/executor/loader/JavassistProxyTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@
2727
import org.apache.ibatis.reflection.factory.DefaultObjectFactory;
2828
import org.apache.ibatis.session.Configuration;
2929
import org.junit.jupiter.api.Assertions;
30+
import org.junit.jupiter.api.BeforeAll;
3031
import org.junit.jupiter.api.Test;
3132

3233
import static org.junit.jupiter.api.Assertions.*;
3334

3435
class JavassistProxyTest extends SerializableProxyTest {
3536

36-
JavassistProxyTest() {
37+
@BeforeAll
38+
static void createProxyFactory() {
3739
proxyFactory = new JavassistProxyFactory();
3840
}
3941

src/test/java/org/apache/ibatis/executor/loader/SerializableProxyTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public abstract class SerializableProxyTest {
3939

4040
protected Author author = new Author(999, "someone", "!@#@!#!@#", "[email protected]", "blah", Section.NEWS);
4141

42-
ProxyFactory proxyFactory;
42+
static ProxyFactory proxyFactory;
4343

4444
@Test
4545
void shouldKeepGenericTypes() {

0 commit comments

Comments
 (0)