KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ldap > server > tools > schema > AttributeTypesTemplateTest


1 /*
2  * Copyright 2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
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 AttributeType producers for all schemas.
25  *
26  * @author <a HREF="mailto:dev@directory.apache.org">Apache Directory Project</a>
27  * @version $Rev: 169198 $
28  */

29 public class AttributeTypesTemplateTest extends AbstractTestCase
30 {
31
32
33     public void testCoreAttributeTypeGeneration() throws Exception JavaDoc
34     {
35         AbstractBootstrapSchema schema = new AbstractBootstrapSchema(
36             "uid=admin,ou=system", "core", "dummy.test",
37             new String JavaDoc[] { "dep1", "dep2" }) {};
38         generateAttributeTypeProducer( schema );
39     }
40
41
42     public void testJavaAttributeTypeGeneration() throws Exception JavaDoc
43     {
44         AbstractBootstrapSchema schema = new AbstractBootstrapSchema(
45             "uid=admin,ou=system", "java", "dummy.test",
46             new String JavaDoc[] { "dep1", "dep2" }) {};
47         generateAttributeTypeProducer( schema );
48     }
49
50
51     public void testCorbaAttributeTypeGeneration() throws Exception JavaDoc
52     {
53         AbstractBootstrapSchema schema = new AbstractBootstrapSchema(
54             "uid=admin,ou=system", "corba", "dummy.test",
55             new String JavaDoc[] { "dep1", "dep2" }) {};
56         generateAttributeTypeProducer( schema );
57     }
58
59
60     public void testCosineAttributeTypeGeneration() throws Exception JavaDoc
61     {
62         AbstractBootstrapSchema schema = new AbstractBootstrapSchema(
63             "uid=admin,ou=system", "cosine", "dummy.test",
64             new String JavaDoc[] { "dep1", "dep2" }) {};
65         generateAttributeTypeProducer( schema );
66     }
67
68
69     public void testInetorgpersonAttributeTypeGeneration() throws Exception JavaDoc
70     {
71         AbstractBootstrapSchema schema = new AbstractBootstrapSchema(
72             "uid=admin,ou=system", "inetorgperson", "dummy.test",
73             new String JavaDoc[] { "dep1", "dep2" }) {};
74         generateAttributeTypeProducer( schema );
75     }
76
77
78     public void testMiscAttributeTypeGeneration() throws Exception JavaDoc
79     {
80         AbstractBootstrapSchema schema = new AbstractBootstrapSchema(
81             "uid=admin,ou=system", "misc", "dummy.test",
82             new String JavaDoc[] { "dep1", "dep2" }) {};
83         generateAttributeTypeProducer( schema );
84     }
85
86
87     public void testNisAttributeTypeGeneration() throws Exception JavaDoc
88     {
89         AbstractBootstrapSchema schema = new AbstractBootstrapSchema(
90             "uid=admin,ou=system", "nis", "dummy.test",
91             new String JavaDoc[] { "dep1", "dep2" }) {};
92         generateAttributeTypeProducer( schema );
93     }
94 }
95
Popular Tags