/*
* 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.
* Portions Copyright 2014-2015 ForgeRock AS
*/
/**
* PropertySet Tester.
*/
/** Default value for boolean property. */
/** Default value for string properties. */
/** Test boolean property def. */
/** Test single valued string property def. */
/** Test multi-valued string property def. */
public <T> Collection<T> getPropertyValues(PropertyDefinition<T> d) throws IllegalArgumentException {
return Collections.emptySet();
}
};
/**
* Creates property definitions for testing.
*/
public void setUp() {
}
/**
* Creates data for tests requiring property definitions.
* @return Object[][] or property definitions
*/
return new Object[][] {
};
}
/**
* Creates data for tests requiring property definitions
* and sample data.
* @return Object[][] consisting of property defs and sets
* of sample data
*/
return new Object[][] {
{ testBoolPropertyDefinition, sb },
};
}
/**
* Test basic property set creation.
*/
@Test
public void testCreate() {
}
/**
* Tests setting and getting property values.
* @param pd PropertyDefinition for which values are set and gotten
* @param values property values to test
*/
assertFalse(p.isModified());
assertTrue(p.isModified());
}
}
/**
* Tests toString().
* @param pd PropertyDefinition for testing
*/
}
/**
* Tests the active values property.
* @param pd PropertyDefinition for testing
* @param values for testing
*/
for (T v : values) {
}
}
/**
* Creates data for default test.
* @return Object[][] data for test
*/
return new Object[][] {
{ testBoolPropertyDefinition, sb },
};
}
/**
* Tests default values property.
* @param pd PropertyDefinition to test
* @param expected default values
*/
for (T v : expected) {
}
}
/**
* Creates data for effective test.
* @return Object[][] data for test
*/
return new Object[][] {
};
}
/**
* Tests effective values property.
* @param pd PropertyDefinition
* @param newValues to apply
* @param expectedDefaults for test comparison
*/
public <T> void testGetEffectiveValues(PropertyDefinition<T> pd, Set<T> newValues, Set<T> expectedDefaults) {
// before setting any values, the effective data
// is supposed to just be the defaults
for(T v : ev1) {
}
// now set some data and make sure the effective
// values now reflect the pending values
for(T v : ev2) {
}
}
/**
* Tests pending values property.
* @param pd PropertyDefinition
* @param newValues set of new values to apply
* @param ignore parameter
*/
// now set some data and make sure the effective
// values now reflect the pending values
for(T v : ev2) {
}
}
/**
* Tests getPropertyDefinition().
* @param pd property definition to test
*/
}
/**
* Tests isEmpty property.
* @param pd PropertyDefinition
* @param newValues set of new values to apply
* @param ignore parameter
*/
assertTrue(p.isEmpty());
assertFalse(p.isEmpty());
}
/**
* Tests isEmpty property.
* @param pd PropertyDefinition
* @param newValues set of new values to apply
* @param ignore parameter
*/
assertFalse(p.isModified());
assertTrue(p.isModified());
}
/**
* Tests wasEmpty property.
* @param pd property def to test
*/
assertTrue(p.wasEmpty());
}
/**
* Tests property toString().
* @param pd definition of property to test
*/
p.toString();
}
}
return ps;
}
if (dbp instanceof DefinedDefaultBehaviorProvider) {
}
}
}
private class TestManagedObjectDefinition<C extends ConfigurationClient,S extends Configuration> extends
ManagedObjectDefinition<C, S> {
/**
* Create a new managed object definition.
*
* @param name The name of the definition.
* @param parent The parent definition, or <code>null</code> if there
* is no parent.
*/
protected
AbstractManagedObjectDefinition<? super C,? super S> parent) {
}
/** {@inheritDoc} */
return null;
}
/** {@inheritDoc} */
return null;
}
/** {@inheritDoc} */
return null;
}
}
}
@SuppressWarnings("unchecked")
public <S> Collection<S> getPropertyValues(PropertyDefinition<S> d) throws IllegalArgumentException {
return (Collection<S>) values;
} else {
return Collections.emptySet();
}
}
}
}
}