public void testEquals()
{
try
{
OpenMBeanParameterInfoSupport infoSupport = new OpenMBeanParameterInfoSupport("test", "hello world", SimpleType.STRING, "black", legalColors);
OpenMBeanParameterInfoSupport equalInfoSupport = new OpenMBeanParameterInfoSupport("test", "hello world", SimpleType.STRING, "black", legalColors);
OpenMBeanParameterInfoSupport info2Support = new OpenMBeanParameterInfoSupport("test2", "hello world2", SimpleType.STRING);
OpenMBeanParameterInfoSupport priceParamInfo2 = new OpenMBeanParameterInfoSupport("price",
"Valid product price",
SimpleType.FLOAT,
new Float(10.00), // default price
new Float(minPrice), // Min legal value for price
new Float(maxPrice)); // Max legal value for price
// test we can equal null values
assertTrue(!(infoSupport.equals(info2Support)));
assertTrue(infoSupport.equals(equalInfoSupport));
assertTrue(equalInfoSupport.equals(infoSupport));
assertTrue(priceParamInfo.equals(priceParamInfo2));
OpenMBeanParameterInfo rebootcmd =
new OpenMBeanParameterInfoSupport("reboot",
"Reboot the server",
SimpleType.INTEGER);
OpenMBeanParameterInfo rebootquery =
new OpenMBeanParameterInfoSupport("reboot",
"Reboot the server",
SimpleType.BOOLEAN);
assertFalse("activeclients.equals(reboot)", rebootcmd.equals(rebootquery));
}
catch (OpenDataException e)