Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9B7AAF465 for ; Sun, 14 Dec 2014 21:12:10 +0000 (UTC) Received: (qmail 94391 invoked by uid 500); 14 Dec 2014 21:12:10 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 94338 invoked by uid 500); 14 Dec 2014 21:12:10 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 94328 invoked by uid 99); 14 Dec 2014 21:12:10 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Dec 2014 21:12:10 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 5066DAC08CB; Sun, 14 Dec 2014 21:12:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1645524 - in /directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test: ./ src/test/java/org/apache/directory/api/osgi/ Date: Sun, 14 Dec 2014 21:12:10 -0000 To: commits@directory.apache.org From: seelmann@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141214211210.5066DAC08CB@hades.apache.org> Author: seelmann Date: Sun Dec 14 21:12:09 2014 New Revision: 1645524 URL: http://svn.apache.org/r1645524 Log: More tests Added: directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapExtraAciOsgiTest.java directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapSchemaDataOsgiTest.java Modified: directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/pom.xml directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapModelOsgiTest.java Modified: directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/pom.xml URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/pom.xml?rev=1645524&r1=1645523&r2=1645524&view=diff ============================================================================== --- directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/pom.xml (original) +++ directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/pom.xml Sun Dec 14 21:12:09 2014 @@ -48,6 +48,28 @@ + org.apache.directory.api + api-ldap-schema-data + ${api.version} + + + antlr + antlr + + + + + org.apache.directory.api + api-ldap-extras-aci + ${api.version} + + + antlr + antlr + + + + org.apache.directory.studio org.antlr.antlr 2.7.7 Added: directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapExtraAciOsgiTest.java URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapExtraAciOsgiTest.java?rev=1645524&view=auto ============================================================================== --- directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapExtraAciOsgiTest.java (added) +++ directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapExtraAciOsgiTest.java Sun Dec 14 21:12:09 2014 @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +package org.apache.directory.api.osgi; + + +import org.apache.directory.api.ldap.aci.ACIItemChecker; +import org.apache.directory.api.ldap.aci.ACIItemParser; +import org.apache.directory.api.ldap.aci.GrantAndDenial; +import org.apache.directory.api.ldap.aci.MicroOperation; +import org.apache.directory.api.ldap.aci.ProtectedItem; +import org.apache.directory.api.ldap.aci.UserClass; + + +public class ApiLdapExtraAciOsgiTest extends ApiOsgiTestBase +{ + + @Override + protected String getBundleName() + { + return "org.apache.directory.api.ldap.extras.aci"; + } + + + @Override + protected void useBundleClasses() throws Exception + { + GrantAndDenial.GRANT_BROWSE.toString(); + MicroOperation.BROWSE.getName(); + UserClass.THIS_ENTRY.toString(); + ProtectedItem.ENTRY.toString(); + + new ACIItemChecker( null ).parse( "" ); + new ACIItemParser( null ).parse( "" ); + + String spec = "{ identificationTag \"test\", precedence 14, authenticationLevel simple, " + + "itemOrUserFirst userFirst: { userClasses { allUsers }, userPermissions { { " + + "precedence 1, protectedItems { attributeType { userPassword } }, grantsAndDenials " + + "{ denyRead, denyReturnDN, denyBrowse } }, { precedence 2, protectedItems " + + "{ entry, allUserAttributeTypesAndValues }, grantsAndDenials " + + "{ grantReturnDN, grantRead, grantBrowse } } } } }"; + new ACIItemParser( null ).parse( spec ); + } + +} Modified: directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapModelOsgiTest.java URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapModelOsgiTest.java?rev=1645524&r1=1645523&r2=1645524&view=diff ============================================================================== --- directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapModelOsgiTest.java (original) +++ directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapModelOsgiTest.java Sun Dec 14 21:12:09 2014 @@ -63,6 +63,7 @@ public class ApiLdapModelOsgiTest extend SchemaObject schemaObject = new LdapSyntax( "1.2.3" ); new Registries().getGlobalOidRegistry().register( schemaObject ); + new Registries().getLoadedSchemas(); } } Added: directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapSchemaDataOsgiTest.java URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapSchemaDataOsgiTest.java?rev=1645524&view=auto ============================================================================== --- directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapSchemaDataOsgiTest.java (added) +++ directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapSchemaDataOsgiTest.java Sun Dec 14 21:12:09 2014 @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +package org.apache.directory.api.osgi; + + +import org.apache.directory.api.ldap.model.schema.SchemaManager; +import org.apache.directory.api.ldap.schemaloader.JarLdifSchemaLoader; +import org.apache.directory.api.ldap.schemamanager.impl.DefaultSchemaManager; + + +public class ApiLdapSchemaDataOsgiTest extends ApiOsgiTestBase +{ + + @Override + protected String getBundleName() + { + return "org.apache.directory.api.ldap.schema"; + } + + + @Override + protected void useBundleClasses() throws Exception + { + JarLdifSchemaLoader loader = new JarLdifSchemaLoader(); + loader.getAllEnabled(); + loader.getAllSchemas(); + + SchemaManager schemaManager = new DefaultSchemaManager(); + schemaManager.getEnabled(); + schemaManager.getDisabled(); + } + +}