1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.custom.swapimage;
20
21 import javax.faces.component.UIComponent;
22
23 import org.apache.myfaces.component.behavior.AbstractClientBehaviorTestCase;
24 import org.apache.myfaces.component.behavior.HtmlClientEventAttributesUtil;
25 import org.apache.myfaces.component.behavior.HtmlRenderedClientEventAttr;
26 import org.junit.Ignore;
27 import org.junit.Test;
28
29
30
31
32
33 public class HtmlSwapImageClientBehaviorRendererTest extends AbstractClientBehaviorTestCase
34 {
35 private HtmlRenderedClientEventAttr[] attrs = null;
36
37 @Override
38 public void setUp() throws Exception
39 {
40 super.setUp();
41 attrs = HtmlClientEventAttributesUtil.generateClientBehaviorEventAttrs();
42 }
43
44 @Override
45 public void tearDown() throws Exception
46 {
47 super.tearDown();
48 attrs = null;
49 }
50
51
52 @Override
53 protected UIComponent createComponentToTest()
54 {
55 HtmlSwapImage swapImage = new HtmlSwapImage();
56 swapImage.setActiveImageUrl("http://testurl/swapimage/activeImg.jpeg");
57 swapImage.setSwapImageUrl("http://testurl/swapimage/swapImg.jpeg");
58 swapImage.setUrl("http://testurl.com");
59 return swapImage;
60 }
61
62 @Override
63 protected HtmlRenderedClientEventAttr[] getClientBehaviorHtmlRenderedAttributes()
64 {
65 return attrs;
66 }
67
68 @Test
69 @Ignore
70 @Override
71 public void testClientBehaviorHolderRendersName()
72 {
73 super.testClientBehaviorHolderRendersName();
74 }
75 }