/*
* 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 2015 ForgeRock AS.
*/
/**
* IntegerPropertyDefinition Tester.
*/
/**
* Tests creation of builder succeeds.
*/
@Test
public void testCreateBuilder() {
}
/**
*/
@Test
public void testLowerLimit1() {
}
/**
* Creates data for testing string-based limit values.
* @return data
*/
return new Object[][]{
{1, 1},
// { null, 0 }
};
}
/**
* Creates data for testing limit values.
* @return data
*/
return new Object[][]{
{-1, 0, true}, // lower, upper, lower first
{0, -1, false},
{2, 1, true},
{2, 1, false}
};
}
/**
* @param limit unit limit
* @param expectedValue to compare
*/
}
/**
*/
@Test
public void testUpperLimit1() {
}
/**
* @param limit upper limit
* @param expectedValue to compare
*/
}
/**
* @param upper upper limit
* @param lower lower limit
* @param lowerFirst when true sets the lower limit property first
*/
if (lowerFirst) {
} else {
}
}
/**
* Tests the allowUnlimited property.
*/
@Test
public void testIsAllowUnlimited1() {
builder.setAllowUnlimited(true);
}
/**
* Tests the allowUnlimited property.
*/
public void testIsAllowUnlimited2() {
builder.setAllowUnlimited(false);
}
/**
* Tests the allowUnlimited property.
*/
public void testIsAllowUnlimited3() {
builder.setAllowUnlimited(false);
}
/**
* Creates illegal data for validate value.
* @return data
*/
return new Object[][]{
{5, 10, false, 7},
{5, 10, true, -1},
};
}
/**
* Tests that validateValue works.
* @param value to validate
* @param allowUnlimited when true allows unlimited
* @param high upper limit
* @param low lower limit
*/
}
/**
* Creates illegal data for validate value.
* @return data
*/
return new Object[][]{
{5, 10, false, 1},
{5, 10, false, 11},
{5, 10, false, -1},
{5, 10, true, 2},
{5, 10, true, 11}
};
}
/**
* Tests that validateValue throws exceptions.
* @param value to validate
* @param low lower limit
* @param high upper limit
* @param allowUnlimited when true allows unlimited
*/
}
/**
* Creates encode test data.
* @return data
*/
return new Object[][]{
{-1, "unlimited"},
{1, "1"},
};
}
/**
* Tests encode value.
* @param value to encode
* @param expectedValue to compare
*/
builder.setAllowUnlimited(true);
}
/**
* Test that accept doesn't throw and exception.
*/
@Test
public void testAccept() {
builder.setAllowUnlimited(true);
Void o) {
return true;
}
throws PropertyException {
return false;
}
};
}
/**
* Make sure toString doesn't barf.
*/
@Test
public void testToString() {
builder.setAllowUnlimited(true);
}
@Test
public void testCompare() {
builder.setAllowUnlimited(true);
}
@Test
public void testSetDefaultBehaviorProvider() {
builder.setAllowUnlimited(true);
return null;
}
});
}
@Test
public void testSetOption() {
}
}
return builder.getInstance();
}
}