}
}
public void testLegalValueCtor() throws Exception
{
OpenMBeanParameterInfoSupport info =
new OpenMBeanParameterInfoSupport("currency",
"monetary currency",
SimpleType.STRING,
"Euro",
new String[]{"Dollar", "Euro", "Yen"});
assertTrue("Null info constructed", info != null);
assertTrue("Unexpected name",
info.getName().compareTo("currency") == 0);
assertTrue("Unexpected description",
info.getDescription().compareTo("monetary currency") == 0);
assertTrue("Unexpected open type",
info.getOpenType().equals(SimpleType.STRING));
assertTrue("Should have default value", info.hasDefaultValue());
assertTrue("Unexpected default value",
((String)info.getDefaultValue()).compareTo("Euro") == 0);
assertTrue("Should have legal values",
info.getLegalValues() != null && info.getLegalValues().size() == 3);
assertFalse("Shouldn't have a min value", info.hasMinValue());
assertFalse("Shouldn't have a max value", info.hasMaxValue());
}