1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.myfaces.view.facelets;
21
22 import javax.faces.component.UIViewRoot;
23 import javax.faces.context.ResponseWriter;
24
25 import org.apache.myfaces.view.facelets.util.FastWriter;
26 import org.junit.Test;
27
28 public class InstructionsTestCase extends FaceletTestCase
29 {
30
31 @Override
32 protected void setupComponents() throws Exception
33 {
34 application.addComponent(UIViewRoot.COMPONENT_TYPE, UIViewRoot.class
35 .getName());
36 }
37
38 @Override
39 protected void setupConvertersAndValidators() throws Exception
40 {
41 }
42
43 @Override
44 protected void setupRenderers() throws Exception
45 {
46 }
47
48 @Test
49 public void testInstructions() throws Exception
50 {
51 UIViewRoot root = facesContext.getViewRoot();
52 vdl.buildView(facesContext, root, "instructions.xhtml");
53 FastWriter fw = new FastWriter();
54 ResponseWriter rw = facesContext.getResponseWriter();
55 rw = rw.cloneWithWriter(fw);
56 facesContext.setResponseWriter(rw);
57 root.encodeAll(facesContext);
58
59 }
60
61 }