Skip to content

Commit 56c39bd

Browse files
authored
Move LDAP tests to JUnit Jupiter (#10744)
1 parent 899a2a8 commit 56c39bd

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

modules/ldap/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ description = "Testcontainers :: LDAP"
33
dependencies {
44
api project(':testcontainers')
55

6+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.11.0'
7+
8+
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.4'
69
testImplementation 'org.assertj:assertj-core:3.27.4'
710
testImplementation 'com.unboundid:unboundid-ldapsdk:7.0.3'
811
}
12+
13+
test {
14+
useJUnitPlatform()
15+
}
16+

modules/ldap/src/test/java/org/testcontainers/ldap/LLdapContainerTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
import com.unboundid.ldap.sdk.LDAPConnection;
55
import com.unboundid.ldap.sdk.LDAPException;
66
import com.unboundid.ldap.sdk.LDAPURL;
7-
import org.junit.Test;
7+
import org.junit.jupiter.api.Test;
88

99
import static org.assertj.core.api.Assertions.assertThat;
1010

11-
public class LLdapContainerTest {
11+
class LLdapContainerTest {
1212

1313
@Test
14-
public void test() throws LDAPException {
14+
void test() throws LDAPException {
1515
try ( // container {
1616
LLdapContainer lldap = new LLdapContainer("lldap/lldap:v0.6.1-alpine")
1717
// }
@@ -24,7 +24,7 @@ public void test() throws LDAPException {
2424
}
2525

2626
@Test
27-
public void testUsingLdapUrl() throws LDAPException {
27+
void testUsingLdapUrl() throws LDAPException {
2828
try (LLdapContainer lldap = new LLdapContainer("lldap/lldap:v0.6.1-alpine")) {
2929
lldap.start();
3030

@@ -36,7 +36,7 @@ public void testUsingLdapUrl() throws LDAPException {
3636
}
3737

3838
@Test
39-
public void testWithCustomBaseDn() throws LDAPException {
39+
void testWithCustomBaseDn() throws LDAPException {
4040
try (
4141
LLdapContainer lldap = new LLdapContainer("lldap/lldap:v0.6.1-alpine")
4242
.withBaseDn("dc=testcontainers,dc=org")
@@ -53,7 +53,7 @@ public void testWithCustomBaseDn() throws LDAPException {
5353
}
5454

5555
@Test
56-
public void testWithCustomUserPass() throws LDAPException {
56+
void testWithCustomUserPass() throws LDAPException {
5757
try (LLdapContainer lldap = new LLdapContainer("lldap/lldap:v0.6.1-alpine").withUserPass("adminPas$word")) {
5858
lldap.start();
5959

0 commit comments

Comments
 (0)