1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to you under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 package org.apache.shale.view.faces;
19
20 import junit.framework.Test;
21 import junit.framework.TestCase;
22 import junit.framework.TestSuite;
23
24 /***
25 * <p>Test case for <code>org.apache.shale.view.faces.ViewControllerCallbacks</code>.</p>
26 */
27 public class ViewControllerCallbacksTestCase extends TestCase {
28
29
30 // ------------------------------------------------------------ Constructors
31
32
33 // Construct a new instance of this test case.
34 public ViewControllerCallbacksTestCase(String name) {
35 super(name);
36 }
37
38
39 // ---------------------------------------------------- Overall Test Methods
40
41
42 // Set up instance variables required by this test case.
43 protected void setUp() throws Exception {
44
45 callbacks = new ViewControllerCallbacks();
46
47 }
48
49
50 // Return the tests included in this test case.
51 public static Test suite() {
52
53 return (new TestSuite(ViewControllerCallbacksTestCase.class));
54
55 }
56
57
58 // Tear down instance variables required by this test case.
59 protected void tearDown() throws Exception {
60
61 callbacks = null;
62
63 }
64
65
66 // ------------------------------------------------------ Instance Variables
67
68
69 private ViewControllerCallbacks callbacks = null;
70
71
72 // ------------------------------------------------------------ Test Methods
73
74
75
76 // Test a prisine instance
77 public void testPristine() {
78
79 ;
80
81 }
82
83
84 // Test calling all of the appropriate methods in order
85 public void testViewControllerCallbacks() {
86
87 TestViewController tvc = new TestViewController();
88 callbacks.preprocess(tvc);
89 callbacks.prerender(tvc);
90 assertEquals("preprocess/prerender/",
91 tvc.log());
92
93 }
94
95
96 }