Skip to content

Commit c9b87bb

Browse files
committed
Testcase for running the LDAP server with no schema
1 parent a4708cf commit c9b87bb

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package org.zapodot.junit.ldap;
2+
3+
import com.unboundid.ldap.sdk.schema.Schema;
4+
import org.junit.Rule;
5+
import org.junit.Test;
6+
7+
import static org.junit.Assert.assertTrue;
8+
9+
public class EmbeddedLdapRuleCustomWithoutSchemaTest {
10+
11+
@Rule
12+
public EmbeddedLdapRule embeddedLdapRule = EmbeddedLdapRuleBuilder.newInstance()
13+
.withoutDefaultSchema()
14+
.build();
15+
16+
@Test
17+
public void testEmptySchema() throws Exception {
18+
final Schema schema =
19+
embeddedLdapRule.ldapConnection().getSchema();
20+
assertTrue(schema.getAttributeTypes().isEmpty());
21+
22+
}
23+
}

0 commit comments

Comments
 (0)