AbstractManagedObjectDefinitionTest.java revision bccd35904bb6c244e7eae5b7ddb28e5c295e856b
/*
* 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 2007-2008 Sun Microsystems, Inc.
*/
@Test(singleThreaded = true)
public class AbstractManagedObjectDefinitionTest extends ConfigTestCase {
/** A test managed object definition. */
private static class ManagedObjectDef extends AbstractManagedObjectDefinition {
}
}
}
public void tearDown() {
}
public Object[][] createIsChildOf() {
return new Object[][] {
// child def, parent def, is child of
};
}
public void testIsChildOf(ManagedObjectDef childDef, ManagedObjectDef parentDef, boolean expectedIsChildOf) {
}
public Object[][] createIsParentOf() {
return new Object[][] {
// parent def, child def, is parent of
};
}
public void testIsParentOf(ManagedObjectDef parentDef, ManagedObjectDef childDef, boolean expectedIsParentOf) {
}
@Test
public void testGetAllChildrenOfTop() {
}
@Test
public void testGetAllChildrenOfMiddle() {
}
@Test
public void testGetAllChildrenNoChild() {
}
@Test
public void testGetChildrenTop() {
}
@Test
public void testGetChildrenMiddleNoChild() {
}
/** Check default value of "class" property provided for parent. */
@Test
public void testPropertyOverrideParent() {
}
/** Check default value of "class" property provided for child. */
@Test
public void testPropertyOverrideChild() {
}
@Test
public void testGetReverseRelationDefinitions() {
Collection<RelationDefinition<TestChildCfgClient, TestChildCfg>> childRelDef = TestChildCfgDefn.getInstance()
assertThat(childRelDef).contains(TestParentCfgDefn.getInstance().getTestChildrenRelationDefinition());
assertThat(childRelDef).contains(TestParentCfgDefn.getInstance().getOptionalTestChildRelationDefinition());
}
@Test
public void testGetAllReverseRelationDefinitions() {
assertThat(childRelDef).contains(TestParentCfgDefn.getInstance().getTestChildrenRelationDefinition());
assertThat(childRelDef).contains(TestParentCfgDefn.getInstance().getOptionalTestChildRelationDefinition());
}
}