*/
@Test
public void testLoadCore() throws Exception
{
LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
SchemaManager schemaManager = new DefaultSchemaManager( loader );
// Check that we can't load a schema without its dependencies
assertFalse( schemaManager.load( "core" ) );
assertTrue( schemaManager.load( "system" ) );
assertTrue( schemaManager.load( "core" ) );
assertTrue( schemaManager.getErrors().isEmpty() );
assertEquals( 92, schemaManager.getAttributeTypeRegistry().size() );
assertEquals( 35, schemaManager.getComparatorRegistry().size() );
assertEquals( 35, schemaManager.getMatchingRuleRegistry().size() );
assertEquals( 35, schemaManager.getNormalizerRegistry().size() );
assertEquals( 36, schemaManager.getObjectClassRegistry().size() );
assertEquals( 59, schemaManager.getSyntaxCheckerRegistry().size() );
assertEquals( 59, schemaManager.getLdapSyntaxRegistry().size() );
assertEquals( 222, schemaManager.getGlobalOidRegistry().size() );
assertEquals( 2, schemaManager.getRegistries().getLoadedSchemas().size() );
assertNotNull( schemaManager.getRegistries().getLoadedSchema( "system" ) );
assertNotNull( schemaManager.getRegistries().getLoadedSchema( "core" ) );
}