directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
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 GMT
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 @@
             </exclusions>
         </dependency>
         <dependency>
+            <groupId>org.apache.directory.api</groupId>
+            <artifactId>api-ldap-schema-data</artifactId>
+            <version>${api.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>antlr</groupId>
+                    <artifactId>antlr</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.directory.api</groupId>
+            <artifactId>api-ldap-extras-aci</artifactId>
+            <version>${api.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>antlr</groupId>
+                    <artifactId>antlr</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
             <groupId>org.apache.directory.studio</groupId>
             <artifactId>org.antlr.antlr</artifactId>
             <version>2.7.7</version>

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();
+    }
+
+}



Mime
View raw message