directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r548438 - /directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateTest.java
Date Mon, 18 Jun 2007 18:40:08 GMT
Author: elecharny
Date: Mon Jun 18 11:40:07 2007
New Revision: 548438

URL: http://svn.apache.org/viewvc?view=rev&rev=548438
Log:
Fixed the typo : metaObjectclass has been renamed metaObjectClass

Modified:
    directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateTest.java

Modified: directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateTest.java?view=diff&rev=548438&r1=548437&r2=548438
==============================================================================
--- directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateTest.java
(original)
+++ directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateTest.java
Mon Jun 18 11:40:07 2007
@@ -56,4 +56,39 @@
             assertTrue( true );
         }
     }
+
+    /*
+     * Test that I can create an ObjectClass entry with an invalid
+     */
+    public void testCreateObjectClassWithNoObjectClass() 
+    throws NamingException
+    {
+        Attributes attributes = new BasicAttributes();
+        Attribute  objectClassAttribute = new BasicAttribute( "objectClass" );
+        
+        objectClassAttribute.add( "top" );
+        objectClassAttribute.add( "metaTop" );
+        objectClassAttribute.add( "metaObjectClass" );
+        
+        // Don't put the objectclasses in the entry : this is in purpose !
+        // attributes.put( objectClassAttribute );
+        
+        attributes.put( "m-oid", "testOID" );
+        
+        // This name is invalid
+        attributes.put( "m-name", "no-objectClasses" );
+        
+        LdapDN dn = getObjectClassContainer( "apachemeta" );
+        dn.add( MetaSchemaConstants.M_OID_AT + "=" + testOID );
+        
+        try
+        {
+            schemaRoot.createSubcontext( dn, attributes );
+            fail(); // Should not reach this point
+        }
+        catch ( NamingException ne )
+        {
+            assertTrue( true );
+        }
+    }
 }



Mime
View raw message