Author: lresende
Date: Wed Aug 15 08:54:37 2007
New Revision: 566232
URL: http://svn.apache.org/viewvc?view=rev&rev=566232
Log:
TUSCANY-1538 - Applying patch from Ole Ersoy
Modified:
incubator/tuscany/java/das/ldap/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/InitialContextCreatorTest.java
Modified:
incubator/tuscany/java/das/ldap/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/InitialContextCreatorTest.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/das/ldap/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/InitialContextCreatorTest.java?view=diff&rev=566232&r1=566231&r2=566232
==============================================================================
---
incubator/tuscany/java/das/ldap/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/InitialContextCreatorTest.java
(original)
+++
incubator/tuscany/java/das/ldap/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/InitialContextCreatorTest.java
Wed Aug 15 08:54:37 2007
@@ -6,16 +6,16 @@
* 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.
- *
+ * under the License.
+ *
*/
package org.apache.tuscany.das.ldap.create.test;
@@ -25,7 +25,7 @@
import org.apache.tuscany.das.ldap.create.InitialContextCreator;
import
org.apache.tuscany.das.ldap.schema.embedded.setup.test.AbstractTestSetup;
-public class InitialContextCreatorTest
+public class InitialContextCreatorTest
extends AbstractTestSetup
{
public void testCreate() throws NamingException
@@ -34,19 +34,25 @@
LdapContext exampleContext = null;
LdapContext usersContext = null;
LdapContext accountsContext = null;
-
- InitialContextCreator. create(
- xsdNamespace,
+ LdapContext rootContext = null;
+
+ rootContext =
+ InitialContextCreator.create(
+ xsdNamespace,
dasPartitionContext );
-
- comContext =
- ( LdapContext )
+
+ assertEquals(
+ rootContext.getNameInNamespace(),
+ "cn=accounts,cn=users,cn=example,cn=com,ou=das");
+
+ comContext =
+ ( LdapContext )
dasPartitionContext.lookup( "cn=com" );
exampleContext = ( LdapContext )comContext.lookup( "cn=example" );
usersContext = ( LdapContext ) exampleContext.lookup( "cn=users" );
accountsContext = ( LdapContext ) usersContext.lookup( "cn=accounts" );
accountsContext = ( LdapContext ) usersContext.lookup( "cn=accounts" );
-
+
assertNotNull(comContext);
assertNotNull(exampleContext);
assertNotNull(usersContext);
@@ -54,7 +60,7 @@
usersContext.
destroySubcontext( "cn=accounts" );
-
+
exampleContext.
destroySubcontext( "cn=users" );
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]