View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.myfaces.trinidad.component.html;
20  
21  import java.io.IOException;
22  
23  import junit.framework.Test;
24  import junit.framework.TestSuite;
25  
26  import org.apache.myfaces.trinidad.component.UIComponentTestCase;
27  
28  /**
29   * Unit tests for HtmlHtml.
30   *
31   */
32  public class HtmlHtmlTest extends UIComponentTestCase
33  {
34    /**
35     * Creates a new HtmlHtmlTest.
36     *
37     * @param testName  the unit test name
38     */
39    public HtmlHtmlTest(
40      String testName)
41    {
42      super(testName);
43    }
44    
45    @Override
46    protected void setUp() throws Exception
47    {
48      super.setUp();
49    }
50    
51    @Override
52    protected void tearDown() throws Exception
53    {
54      super.tearDown();
55    }
56    
57    public static Test suite()
58    {
59      return new TestSuite(HtmlHtmlTest.class);
60    }
61  
62    /**
63     * Tests the transparency of component attributes.
64     *
65     * @todo remaining attributes
66     */
67    public void testAttributeTransparency()
68    {
69      //HtmlHtml component = new HtmlHtml();
70  
71      // remaining attributes here
72    }
73  
74    /**
75     * Tests the apply-request-values lifecycle phase.
76     */
77    public void testApplyRequestValues()
78    {
79      doTestApplyRequestValues(new HtmlHtml());
80    }
81  
82    /**
83     * Tests the process-validations lifecycle phase.
84     */
85    public void testProcessValidations()
86    {
87      doTestProcessValidations(new HtmlHtml());
88    }
89  
90    /**
91     * Tests the update-model-values lifecycle phase.
92     */
93    public void testUpdateModelValues()
94    {
95      doTestUpdateModelValues(new HtmlHtml());
96    }
97  
98    /**
99     * Tests the invoke-application lifecycle phase.
100    */
101   public void testInvokeApplication()
102   {
103     HtmlHtml component = new HtmlHtml();
104 
105     doTestInvokeApplication(component, null);
106   }
107 
108   /**
109    * Tests the render-response lifecycle phase.
110    *
111    * @throws IOException  when test fails
112    */
113   public void testRenderResponse() throws IOException
114   {
115     doTestRenderResponse(new HtmlHtml());
116   }
117 }