You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2004/10/10 10:03:39 UTC

svn commit: rev 54226 - incubator/directory/eve/trunk/backend/tools/src/test/org/apache/eve/tools/schema

Author: akarasulu
Date: Sun Oct 10 01:03:38 2004
New Revision: 54226

Modified:
   incubator/directory/eve/trunk/backend/tools/src/test/org/apache/eve/tools/schema/OpenLdapSchemaParserTest.java
Log:
adding more checks to test case

Modified: incubator/directory/eve/trunk/backend/tools/src/test/org/apache/eve/tools/schema/OpenLdapSchemaParserTest.java
==============================================================================
--- incubator/directory/eve/trunk/backend/tools/src/test/org/apache/eve/tools/schema/OpenLdapSchemaParserTest.java	(original)
+++ incubator/directory/eve/trunk/backend/tools/src/test/org/apache/eve/tools/schema/OpenLdapSchemaParserTest.java	Sun Oct 10 01:03:38 2004
@@ -20,6 +20,7 @@
 import java.util.Map;
 
 import junit.framework.TestCase;
+import org.apache.ldap.common.schema.ObjectClassTypeEnum;
 
 
 /**
@@ -55,7 +56,7 @@
     }
 
 
-    public void testSimpleAttributeType() throws Exception
+    public void testSimpleAttributeTypeParse() throws Exception
     {
         String attributeTypeData = "# adding a comment  \n" +
             "attributetype ( 2.5.4.2 NAME 'knowledgeInformation'\n" +
@@ -75,7 +76,7 @@
     }
 
 
-    public void testComplexAttributeType() throws Exception
+    public void testComplexAttributeTypeParse() throws Exception
     {
         String attributeTypeData = "# adding a comment  \n" +
             "attributetype ( 2.5.4.2 NAME ( 'knowledgeInformation' 'asdf' ) \n" +
@@ -95,7 +96,7 @@
     }
 
 
-    public void testSimpleObjectClass() throws Exception
+    public void testObjectClassParse() throws Exception
     {
         String objectClassData = "objectclass ( 2.5.6.6 NAME 'person'\n" +
             "        DESC 'RFC2256: a person'\n" +
@@ -107,5 +108,15 @@
         ObjectClassLiteral objectClass = ( ObjectClassLiteral ) objectClasses.get( "2.5.6.6" );
 
         assertNotNull( objectClass );
+        assertEquals( "2.5.6.6", objectClass.getOid() );
+        assertEquals( "person", objectClass.getNames()[0] );
+        assertEquals( "RFC2256: a person", objectClass.getDescription() );
+        assertEquals( ObjectClassTypeEnum.STRUCTURAL, objectClass.getClassType() );
+        assertEquals( "sn", objectClass.getMust()[0] );
+        assertEquals( "cn", objectClass.getMust()[1] );
+        assertEquals( "userPassword", objectClass.getMay()[0] );
+        assertEquals( "telephoneNumber", objectClass.getMay()[1] );
+        assertEquals( "seeAlso", objectClass.getMay()[2] );
+        assertEquals( "description", objectClass.getMay()[3] );
     }
 }