1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package javax.faces;
21
22 import org.junit.After;
23 import org.junit.Assert;
24 import org.junit.Before;
25 import org.junit.Test;
26
27 public class FacesExceptionTest
28 {
29
30 public FacesExceptionTest()
31 {
32 }
33
34 @Before
35 public void setUp() throws Exception
36 {
37 }
38
39 @After
40 public void tearDown() throws Exception
41 {
42 }
43
44
45
46
47 @Test
48 public void testFacesException()
49 {
50 FacesException e = new FacesException();
51 Assert.assertNull(e.getCause());
52 Assert.assertNull(e.getMessage());
53 }
54
55
56
57
58 @Test
59 public void testFacesExceptionThrowable()
60 {
61 Throwable t = new Throwable();
62 FacesException fe = new FacesException(t);
63 Assert.assertEquals(t, fe.getCause());
64 }
65
66
67
68
69 @Test
70 public void testFacesExceptionString()
71 {
72 String m = "Message";
73 FacesException e = new FacesException(m);
74 Assert.assertEquals(e.getMessage(), m);
75 }
76
77
78
79
80 @Test
81 public void testFacesExceptionStringThrowable()
82 {
83 String m = "Message";
84 Throwable t = new Throwable();
85 FacesException fe = new FacesException(m, t);
86 Assert.assertEquals(t, fe.getCause());
87 Assert.assertEquals(fe.getMessage(), m);
88 }
89
90
91
92
93 @Test
94 public void testGetCause()
95 {
96
97 }
98
99 }