public class getRedoPresentationName
implements Testlet
{
public void test(TestHarness harness)
{
AbstractUndoableEdit edit;
String oldValue;
edit = new AbstractUndoableEdit()
{
public String getPresentationName()
{
return "Action";
}
};
// Check #1.
oldValue = UIManager.getString("AbstractUndoableEdit.undoText");
UIManager.put("AbstractUndoableEdit.redoText", "RedoBar");
harness.check(edit.getRedoPresentationName(), "RedoBar Action");
// Check #2.
edit = new AbstractUndoableEdit();
harness.check(edit.getRedoPresentationName(), "RedoBar");
UIManager.put("AbstractUndoableEdit.redoText", oldValue);
}