Skip to content

Commit 4e72a91

Browse files
committed
Update Sandbox Tests to JUnit 5
Issue gh-1058
1 parent e69a0ab commit 4e72a91

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

sandbox/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ dependencies {
99
provided "com.sun:ldapbp:1.0"
1010

1111
testImplementation platform('org.junit:junit-bom')
12-
testImplementation "org.junit.vintage:junit-vintage-engine"
13-
testImplementation "junit:junit"
12+
testImplementation "org.junit.jupiter:junit-jupiter-api"
13+
testImplementation "org.junit.jupiter:junit-jupiter-engine"
14+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
1415
testImplementation "org.mockito:mockito-core"
1516
testImplementation "gsbase:gsbase"
1617
testImplementation "org.assertj:assertj-core"
@@ -26,4 +27,5 @@ compileTestJava {
2627

2728
test {
2829
jvmArgs '--add-exports', 'java.naming/com.sun.jndi.ldap=ALL-UNNAMED'
30+
useJUnitPlatform()
2931
}

sandbox/src/test/java/org/springframework/ldap/control/VirtualListViewControlDirContextProcessorTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
import com.sun.jndi.ldap.ctl.VirtualListViewControl;
2828
import com.sun.jndi.ldap.ctl.VirtualListViewResponseControl;
2929
import junit.framework.AssertionFailedError;
30-
import org.junit.Before;
31-
import org.junit.Test;
30+
import org.junit.jupiter.api.BeforeEach;
31+
import org.junit.jupiter.api.Test;
3232

3333
import org.springframework.ldap.OperationNotSupportedException;
3434

@@ -50,7 +50,7 @@ public class VirtualListViewControlDirContextProcessorTests {
5050

5151
private LdapContext ldapContextMock;
5252

53-
@Before
53+
@BeforeEach
5454
public void setUp() throws Exception {
5555
// Create ldapContext mock
5656
this.ldapContextMock = mock(LdapContext.class);

0 commit comments

Comments
 (0)