1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.springframework.richclient.command.config;
17
18 import javax.swing.JButton;
19
20
21
22
23
24
25 public class DefaultCommandButtonConfigurerTests extends CommandButtonConfigurerTestCase {
26
27 protected CommandButtonConfigurer createConfigurer() {
28 return new DefaultCommandButtonConfigurer();
29 }
30
31 public void testConfigure() {
32 DefaultCommandButtonConfigurer configurer = new DefaultCommandButtonConfigurer();
33 JButton button = new JButton();
34
35 configurer.configure(button, null, getCommandFaceDescriptor());
36
37 assertEquals(getCommandFaceDescriptor().getText(), button.getText());
38 assertEquals(getCommandFaceDescriptor().getIcon(), button.getIcon());
39 assertEquals(getCommandFaceDescriptor().getCaption(), button.getToolTipText());
40 }
41 }