~ubuntu-branches/ubuntu/trusty/libstruts1.2-java/trusty-proposed

« back to all changes in this revision

Viewing changes to src/test/org/apache/struts/taglib/html/TestMessagesTag5.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2004-11-19 15:35:25 UTC
  • Revision ID: james.westby@ubuntu.com-20041119153525-mdu08a76z4zo67xt
Tags: upstream-1.2.4
ImportĀ upstreamĀ versionĀ 1.2.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Header: /home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/html/TestMessagesTag5.java,v 1.6 2004/03/14 06:23:41 sraeburn Exp $
 
3
 * $Revision: 1.6 $
 
4
 * $Date: 2004/03/14 06:23:41 $
 
5
 *
 
6
 * Copyright 1999-2004 The Apache Software Foundation.
 
7
 * 
 
8
 * Licensed under the Apache License, Version 2.0 (the "License");
 
9
 * you may not use this file except in compliance with the License.
 
10
 * You may obtain a copy of the License at
 
11
 * 
 
12
 *      http://www.apache.org/licenses/LICENSE-2.0
 
13
 * 
 
14
 * Unless required by applicable law or agreed to in writing, software
 
15
 * distributed under the License is distributed on an "AS IS" BASIS,
 
16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
17
 * See the License for the specific language governing permissions and
 
18
 * limitations under the License.
 
19
 */
 
20
package org.apache.struts.taglib.html;
 
21
 
 
22
import java.util.Locale;
 
23
 
 
24
import javax.servlet.jsp.PageContext;
 
25
 
 
26
import junit.framework.Test;
 
27
import junit.framework.TestSuite;
 
28
 
 
29
import org.apache.cactus.JspTestCase;
 
30
import org.apache.struts.Globals;
 
31
 
 
32
/**
 
33
 * Suite of unit tests for the
 
34
 * <code>org.apache.struts.taglib.html.MessagesTag</code> class.
 
35
 *
 
36
 */
 
37
public class TestMessagesTag5 extends JspTestCase {
 
38
 
 
39
    /**
 
40
     * Defines the testcase name for JUnit.
 
41
     *
 
42
     * @param theName the testcase's name.
 
43
     */
 
44
    public TestMessagesTag5(String theName) {
 
45
        super(theName);
 
46
    }
 
47
 
 
48
    /**
 
49
     * Start the tests.
 
50
     *
 
51
     * @param theArgs the arguments. Not used
 
52
     */
 
53
    public static void main(String[] theArgs) {
 
54
        junit.awtui.TestRunner.main(new String[] {TestMessagesTag5.class.getName()});
 
55
    }
 
56
 
 
57
    /**
 
58
     * @return a test suite (<code>TestSuite</code>) that includes all methods
 
59
     *         starting with "test"
 
60
     */
 
61
    public static Test suite() {
 
62
        // All methods starting with "test" will be executed in the test suite.
 
63
        return new TestSuite(TestMessagesTag5.class);
 
64
    }
 
65
 
 
66
    private void runMyTest(String whichTest, String locale) throws Exception {
 
67
        pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), PageContext.SESSION_SCOPE);
 
68
        request.setAttribute("runTest", whichTest);
 
69
        pageContext.forward("/test/org/apache/struts/taglib/html/TestMessagesTag5.jsp");
 
70
    }
 
71
 
 
72
    /*
 
73
     * Testing MessagesTag.
 
74
     */
 
75
 
 
76
  public void testMessages() throws Exception {
 
77
   runMyTest("testMessages", "");
 
78
  }
 
79
 
 
80
  public void testMessagesDefaultBundleEmpty() throws Exception {
 
81
   runMyTest("testMessagesDefaultBundleEmpty", "");
 
82
  }
 
83
 
 
84
  public void testMessagesActionMessageDefaultBundle() throws Exception {
 
85
   runMyTest("testMessagesActionMessageDefaultBundle", "");
 
86
  }
 
87
 
 
88
  public void testMessagesActionMessageDefaultBundleHeader() throws Exception {
 
89
   runMyTest("testMessagesActionMessageDefaultBundleHeader", "");
 
90
  }
 
91
 
 
92
 
 
93
  public void testMessagesActionMessageDefaultBundleHeaderFooter() throws Exception {
 
94
   runMyTest("testMessagesActionMessageDefaultBundleHeaderFooter", "");
 
95
  }
 
96
 
 
97
 
 
98
  public void testMessagesNameDefaultBundleEmpty() throws Exception {
 
99
   runMyTest("testMessagesNameDefaultBundleEmpty", "");
 
100
  }
 
101
 
 
102
  public void testMessagesNamePropertyDefaultBundleEmpty() throws Exception {
 
103
   runMyTest("testMessagesNamePropertyDefaultBundleEmpty", "");
 
104
  }
 
105
 
 
106
  public void testMessagesNameActionMessageDefaultBundle() throws Exception {
 
107
   runMyTest("testMessagesNameActionMessageDefaultBundle", "");
 
108
  }
 
109
 
 
110
  public void testMessagesNamePropertyActionMessageDefaultBundle() throws Exception {
 
111
   runMyTest("testMessagesNamePropertyActionMessageDefaultBundle", "");
 
112
  }
 
113
 
 
114
  public void testMessagesNameActionMessageDefaultBundleHeader() throws Exception {
 
115
   runMyTest("testMessagesNameActionMessageDefaultBundleHeader", "");
 
116
  }
 
117
 
 
118
  public void testMessagesNamePropertyActionMessageDefaultBundleHeader() throws Exception {
 
119
   runMyTest("testMessagesNamePropertyActionMessageDefaultBundleHeader", "");
 
120
  }
 
121
 
 
122
  public void testMessagesNameActionMessageDefaultBundleHeaderFooter() throws Exception {
 
123
   runMyTest("testMessagesNameActionMessageDefaultBundleHeaderFooter", "");
 
124
  }
 
125
 
 
126
  public void testMessagesNamePropertyActionMessageDefaultBundleHeaderFooter() throws Exception {
 
127
   runMyTest("testMessagesNamePropertyActionMessageDefaultBundleHeaderFooter", "");
 
128
  }
 
129
 
 
130
 
 
131
  public void testMessagesAlternateBundleEmpty() throws Exception {
 
132
   runMyTest("testMessagesAlternateBundleEmpty", "");
 
133
  }
 
134
 
 
135
  public void testMessagesActionMessageAlternateBundle() throws Exception {
 
136
   runMyTest("testMessagesActionMessageAlternateBundle", "");
 
137
  }
 
138
 
 
139
  public void testMessagesActionMessageAlternateBundleHeader() throws Exception {
 
140
   runMyTest("testMessagesActionMessageAlternateBundleHeader", "");
 
141
  }
 
142
 
 
143
 
 
144
  public void testMessagesActionMessageAlternateBundleHeaderFooter() throws Exception {
 
145
   runMyTest("testMessagesActionMessageAlternateBundleHeaderFooter", "");
 
146
  }
 
147
 
 
148
  public void testMessagesNameAlternateBundleEmpty() throws Exception {
 
149
   runMyTest("testMessagesNameAlternateBundleEmpty", "");
 
150
  }
 
151
 
 
152
  public void testMessagesNamePropertyAlternateBundleEmpty() throws Exception {
 
153
   runMyTest("testMessagesNamePropertyAlternateBundleEmpty", "");
 
154
  }
 
155
 
 
156
  public void testMessagesNameActionMessageAlternateBundle() throws Exception {
 
157
   runMyTest("testMessagesNameActionMessageAlternateBundle", "");
 
158
  }
 
159
 
 
160
  public void testMessagesNamePropertyActionMessageAlternateBundle() throws Exception {
 
161
   runMyTest("testMessagesNamePropertyActionMessageAlternateBundle", "");
 
162
  }
 
163
 
 
164
  public void testMessagesNameActionMessageAlternateBundleHeader() throws Exception {
 
165
   runMyTest("testMessagesNameActionMessageAlternateBundleHeader", "");
 
166
  }
 
167
 
 
168
  public void testMessagesNamePropertyActionMessageAlternateBundleHeader() throws Exception {
 
169
   runMyTest("testMessagesNamePropertyActionMessageAlternateBundleHeader", "");
 
170
  }
 
171
 
 
172
  public void testMessagesNameActionMessageAlternateBundleHeaderFooter() throws Exception {
 
173
   runMyTest("testMessagesNameActionMessageAlternateBundleHeaderFooter", "");
 
174
  }
 
175
 
 
176
  public void testMessagesNamePropertyActionMessageAlternateBundleHeaderFooter() throws Exception {
 
177
   runMyTest("testMessagesNamePropertyActionMessageAlternateBundleHeaderFooter", "");
 
178
  }
 
179
 
 
180
 
 
181
}