directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1645871 - in /directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test: pom.xml src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasCodecOsgiTest.java src/test/java/org/apache/directory/api/osgi/ApiOsgiTestBase.java
Date Tue, 16 Dec 2014 07:41:49 GMT
Author: seelmann
Date: Tue Dec 16 07:41:49 2014
New Revision: 1645871

URL: http://svn.apache.org/r1645871
Log:
Another test

Added:
    directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasCodecOsgiTest.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/ApiOsgiTestBase.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=1645871&r1=1645870&r2=1645871&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 Tue Dec 16 07:41:49
2014
@@ -82,6 +82,17 @@
         </dependency>
         <dependency>
             <groupId>org.apache.directory.api</groupId>
+            <artifactId>api-ldap-extras-codec</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-codec-api</artifactId>
             <version>${api.version}</version>
             <exclusions>

Added: directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasCodecOsgiTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasCodecOsgiTest.java?rev=1645871&view=auto
==============================================================================
--- directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasCodecOsgiTest.java
(added)
+++ directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasCodecOsgiTest.java
Tue Dec 16 07:41:49 2014
@@ -0,0 +1,84 @@
+/*
+ *   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 static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Iterator;
+
+import javax.inject.Inject;
+
+import org.apache.directory.api.ldap.codec.api.CodecControl;
+import org.apache.directory.api.ldap.codec.api.LdapApiService;
+import org.apache.directory.api.ldap.codec.protocol.mina.LdapProtocolCodecFactory;
+import org.apache.directory.api.ldap.extras.controls.SynchronizationModeEnum;
+import org.apache.directory.api.ldap.extras.controls.ad.AdDirSync;
+import org.apache.directory.api.ldap.extras.controls.ad.AdDirSyncImpl;
+import org.apache.directory.api.ldap.extras.controls.ad_impl.AdDirSyncContainer;
+import org.apache.directory.api.ldap.extras.controls.ad_impl.AdDirSyncDecorator;
+import org.apache.directory.api.ldap.extras.controls.ppolicy.PasswordPolicy;
+import org.apache.directory.api.ldap.extras.controls.ppolicy.PasswordPolicyImpl;
+import org.apache.directory.api.ldap.extras.controls.ppolicy_impl.PasswordPolicyDecorator;
+import org.apache.directory.api.ldap.extras.controls.syncrepl.syncInfoValue.SyncInfoValueImpl;
+import org.apache.directory.api.ldap.extras.controls.syncrepl.syncState.SyncStateValueImpl;
+import org.apache.directory.api.ldap.extras.extended.ads_impl.startTls.StartTlsRequestDecorator;
+import org.apache.directory.api.ldap.extras.extended.pwdModify.PasswordModifyRequestImpl;
+import org.apache.directory.api.ldap.extras.extended.pwdModify.PasswordModifyResponseImpl;
+import org.apache.directory.api.ldap.extras.extended.startTls.StartTlsRequest;
+import org.apache.directory.api.ldap.extras.extended.startTls.StartTlsRequestImpl;
+import org.apache.directory.api.ldap.extras.extended.startTls.StartTlsResponseImpl;
+import org.apache.directory.api.ldap.extras.extended.whoAmI.WhoAmIRequestImpl;
+import org.apache.directory.api.ldap.extras.extended.whoAmI.WhoAmIResponseImpl;
+import org.apache.directory.api.ldap.model.message.Control;
+import org.apache.directory.api.ldap.model.message.ExtendedRequest;
+import org.apache.directory.api.ldap.model.name.Dn;
+import org.junit.Test;
+import org.osgi.framework.ServiceReference;
+
+
+public class ApiLdapExtrasCodecOsgiTest extends ApiOsgiTestBase
+{
+
+    @Inject
+    LdapApiService ldapApiService;
+
+
+    @Override
+    protected String getBundleName()
+    {
+        return "org.apache.directory.api.ldap.extras.codec";
+    }
+
+
+    @Override
+    protected void useBundleClasses() throws Exception
+    {
+        CodecControl<? extends Control> control = ldapApiService.newControl( PasswordPolicy.OID
);
+        assertNotNull( control );
+        assertTrue( control instanceof PasswordPolicyDecorator );
+
+        ExtendedRequest extendedRequest = ldapApiService.newExtendedRequest( StartTlsRequest.EXTENSION_OID,
null );
+        assertNotNull( extendedRequest );
+        assertTrue( extendedRequest instanceof StartTlsRequestDecorator );
+    }
+
+}

Modified: directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiOsgiTestBase.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiOsgiTestBase.java?rev=1645871&r1=1645870&r2=1645871&view=diff
==============================================================================
--- directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiOsgiTestBase.java
(original)
+++ directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiOsgiTestBase.java
Tue Dec 16 07:41:49 2014
@@ -124,7 +124,7 @@ public abstract class ApiOsgiTestBase
         Bundle[] bundles = context.getBundles();
         for ( Bundle bundle : bundles )
         {
-            //System.out.println( "### bundle=" + bundle );
+            //System.out.println( "### bundle=" + bundle + " " + bundle.getState() );
             if ( bundle != null && bundle.getSymbolicName() != null && bundle.getSymbolicName().equals(
bundleName ) )
             {
                 bundleFound = true;



Mime
View raw message