directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1645979 - in /directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test: ./ src/test/java/org/apache/directory/api/osgi/
Date Tue, 16 Dec 2014 15:36:42 GMT
Author: seelmann
Date: Tue Dec 16 15:36:42 2014
New Revision: 1645979

URL: http://svn.apache.org/r1645979
Log:
Another test, added test to verify import of javax.naming

Added:
    directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasUtilOsgiTest.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
    directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiUtilOsgiTest.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=1645979&r1=1645978&r2=1645979&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 15:36:42
2014
@@ -103,6 +103,17 @@
             </exclusions>
         </dependency>
         <dependency>
+            <groupId>org.apache.directory.api</groupId>
+            <artifactId>api-ldap-extras-util</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/ApiLdapExtrasUtilOsgiTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasUtilOsgiTest.java?rev=1645979&view=auto
==============================================================================
--- directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasUtilOsgiTest.java
(added)
+++ directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiLdapExtrasUtilOsgiTest.java
Tue Dec 16 15:36:42 2014
@@ -0,0 +1,51 @@
+/*
+ *   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.assertEquals;
+
+import javax.naming.Name;
+
+import org.apache.directory.api.ldap.model.name.Dn;
+import org.apache.directory.api.ldap.util.JndiUtils;
+import org.apache.directory.api.ldap.util.tree.DnNode;
+
+
+public class ApiLdapExtrasUtilOsgiTest extends ApiOsgiTestBase
+{
+
+    @Override
+    protected String getBundleName()
+    {
+        return "org.apache.directory.api.ldap.extras.util";
+    }
+
+
+    @Override
+    protected void useBundleClasses() throws Exception
+    {
+        Dn dn = new Dn( "cn=foo" );
+        Name name = JndiUtils.toName( dn );
+        assertEquals( name.toString(), dn.toString() );
+        new DnNode<Object>().add( dn ).getParent();
+    }
+
+}

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=1645979&r1=1645978&r2=1645979&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
Tue Dec 16 15:36:42 2014
@@ -20,6 +20,7 @@
 package org.apache.directory.api.osgi;
 
 
+import org.apache.directory.api.ldap.model.entry.AttributeUtils;
 import org.apache.directory.api.ldap.model.entry.DefaultAttribute;
 import org.apache.directory.api.ldap.model.entry.DefaultEntry;
 import org.apache.directory.api.ldap.model.entry.StringValue;
@@ -52,6 +53,8 @@ public class ApiLdapModelOsgiTest extend
         new DefaultAttribute( "cn" );
         new DefaultEntry();
 
+        AttributeUtils.toJndiAttribute( new DefaultAttribute( "cn" ) );
+        
         new BindRequestImpl();
 
         new EqualityNode<String>( "cn", new StringValue( "foo" ) );

Modified: directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiUtilOsgiTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiUtilOsgiTest.java?rev=1645979&r1=1645978&r2=1645979&view=diff
==============================================================================
--- directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiUtilOsgiTest.java
(original)
+++ directory/sandbox/seelmann/osgi-testing/api-paxexam-osgi-test/src/test/java/org/apache/directory/api/osgi/ApiUtilOsgiTest.java
Tue Dec 16 15:36:42 2014
@@ -22,7 +22,10 @@ package org.apache.directory.api.osgi;
 
 import java.util.Date;
 
+import org.apache.directory.api.util.EmptyEnumeration;
 import org.apache.directory.api.util.GeneralizedTime;
+import org.apache.directory.api.util.Hex;
+import org.apache.directory.api.util.SingletonEnumeration;
 import org.apache.directory.api.util.exception.MultiException;
 
 
@@ -41,6 +44,9 @@ public class ApiUtilOsgiTest extends Api
     {
         new GeneralizedTime( new Date() ).getHour();
         new MultiException();
+        new EmptyEnumeration<String>();
+        new SingletonEnumeration<String>( "foo" );
+        Hex.decodeHexString( "#60" );
     }
 
 }



Mime
View raw message