/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2008 Sun Microsystems, Inc.
*/
/**
* ManagedObjectPath test cases.
*/
/**
* Sets up tests
*
* @throws Exception
* If the server could not be initialized.
*/
// This test suite depends on having the schema available, so
// we'll start the server.
}
/**
* Tests that the empty path is empty.
*/
@Test
public void testEmptyPathIsEmpty() {
}
/**
* Tests that the empty path has a size of zero.
*/
@Test
public void testEmptyPathHasZeroElements() {
}
/**
* Tests that the empty path has no parent.
*/
public void testEmptyPathHasNoParent() {
}
/**
* Tests that the empty path represents the root configuration.
*/
@Test
public void testEmptyPathIsRootConfiguration() {
}
/**
* Tests that the empty path represents has no relation.
*/
@Test
public void testEmptyPathHasNoRelation() {
}
/**
* Tests that the empty path has no name.
*/
@Test
public void testEmptyPathHasNoName() {
}
/**
* Tests that the empty path has a string representation of "/".
*/
@Test
public void testEmptyPathString() {
}
/**
* Tests that the empty path can be decoded.
*/
@Test
public void testEmptyPathDecode() {
}
/**
* Tests singleton child creation.
*/
@Test
public void testSingletonChild() {
.getInstance());
.valueOf("/relation=global-configuration"));
}
/**
* Tests instantiable child creation.
*/
@Test
public void testInstantiableChild() {
"LDAP connection handler");
.getInstance());
"/relation=connection-handler+name=LDAP connection handler");
.valueOf("/relation=connection-handler+name=LDAP connection handler"));
}
/**
* Tests instantiable child creation with specific sub-type.
*/
@Test
public void testInstantiableChildWithSubtype() {
"LDAP connection handler");
"/relation=connection-handler+type=ldap-connection-handler+name=LDAP connection handler");
.valueOf("/relation=connection-handler+type=ldap-connection-handler+name=LDAP connection handler"));
}
/**
* Tests instantiable child creation with multiple levels.
*/
@Test
public void testInstantiableMultipleLevels() {
.getReplicationDomainsRelationDefinition(), "Domain");
.getInstance());
"/relation=synchronization-provider+type=replication-synchronization-provider+name=MMR/relation=replication-domain+name=Domain");
.valueOf("/relation=synchronization-provider+type=replication-synchronization-provider+name=MMR/relation=replication-domain+name=Domain"));
}
/**
* Tests matches and equals methods behave differently.
*/
@Test
public void testMatches() {
"LDAP connection handler");
"LDAP connection handler");
"Another LDAP connection handler");
}
/**
* Tests toDN method.
*
* @throws Exception
* If an unexpected error occurred.
*/
@Test
"LDAP connection handler");
"LDAP connection handler");
"Another LDAP connection handler");
DN expectedChild3 = DN.decode("cn=Another LDAP connection handler,cn=connection handlers,cn=config");
}
}