1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.ldap.server.tools.schema;
18
19
20 import org.apache.ldap.server.schema.bootstrap.AbstractBootstrapSchema;
21
22
23 /***
24 * A test which tries to generate ObjectClass producers for all schemas.
25 *
26 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
27 * @version $Rev: 264732 $
28 */
29 public class ObjectClassesTemplateTest extends AbstractTestCase
30 {
31
32
33 public void testCoreObjectClassGeneration() throws Exception
34 {
35 AbstractBootstrapSchema schema = new AbstractBootstrapSchema(
36 "uid=admin,ou=system", "core", "dummy.test",
37 new String[] { "dep1", "dep2" }) {};
38 generateObjectClassProducer( schema );
39 }
40
41
42 public void testJavaObjectClassGeneration() throws Exception
43 {
44 AbstractBootstrapSchema schema = new AbstractBootstrapSchema(
45 "uid=admin,ou=system", "java", "dummy.test",
46 new String[] { "dep1", "dep2" }) {};
47 generateObjectClassProducer( schema );
48 }
49
50
51 public void testCorbaObjectClassGeneration() throws Exception
52 {
53 AbstractBootstrapSchema schema = new AbstractBootstrapSchema(
54 "uid=admin,ou=system", "corba", "dummy.test",
55 new String[] { "dep1", "dep2" }) {};
56 generateObjectClassProducer( schema );
57 }
58
59
60 public void testCosineObjectClassGeneration() throws Exception
61 {
62 AbstractBootstrapSchema schema = new AbstractBootstrapSchema(
63 "uid=admin,ou=system", "cosine", "dummy.test",
64 new String[] { "dep1", "dep2" }) {};
65 generateObjectClassProducer( schema );
66 }
67
68
69 public void testInetorgpersonObjectClassGeneration() throws Exception
70 {
71 AbstractBootstrapSchema schema = new AbstractBootstrapSchema(
72 "uid=admin,ou=system", "inetorgperson", "dummy.test",
73 new String[] { "dep1", "dep2" }) {};
74 generateObjectClassProducer( schema );
75 }
76
77
78 public void testMiscObjectClassGeneration() throws Exception
79 {
80 AbstractBootstrapSchema schema = new AbstractBootstrapSchema(
81 "uid=admin,ou=system", "misc", "dummy.test",
82 new String[] { "dep1", "dep2" }) {};
83 generateObjectClassProducer( schema );
84 }
85
86
87 public void testNisObjectClassGeneration() throws Exception
88 {
89 AbstractBootstrapSchema schema = new AbstractBootstrapSchema(
90 "uid=admin,ou=system", "nis", "dummy.test",
91 new String[] { "dep1", "dep2" }) {};
92 generateObjectClassProducer( schema );
93 }
94 }