* <li>disable/enable the command --> check if all buttons follow up on the changes</li>
* </ol>
*/
public void testMultifacedCommandDisabling()
{
ActionCommand command = new ActionCommand(MAIN_ID)
{
protected void doExecuteCommand()
{
// does nothing during this test anyway
}
};
AbstractButton standardButton = command.createButton();
// test this dude's enabling
command.setEnabled(false);
assertFalse("standard face button didn't follow up on the command's disabling", standardButton
.isEnabled());
command.setEnabled(true);
assertTrue("standard face button didn't follow up on the command's enabling", standardButton
.isEnabled());
// register an alternative face to this command
CommandFaceDescriptor face = new CommandFaceDescriptor();
command.setFaceDescriptor(ALTERNATE_ID, face);
// and get us a button with that face
AbstractButton otherFacedButton = command.createButton(ALTERNATE_ID);
// test this newly faced dude
command.setEnabled(false);
assertFalse("alternative face button didn't follow up on the command's disabling", otherFacedButton
.isEnabled());
command.setEnabled(true);
assertTrue("alternative face button didn't follow up on the command's enabling", otherFacedButton
.isEnabled());
}