1 package org.apache.turbine.services.rundata;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 import org.apache.turbine.Turbine;
25 import org.apache.turbine.TurbineConstants;
26 import org.apache.turbine.test.BaseTestCase;
27 import org.apache.turbine.util.TurbineConfig;
28
29 public class DefaultTurbineRunDataTest extends BaseTestCase
30 {
31 private static TurbineConfig tc = null;
32 public DefaultTurbineRunDataTest(String name) throws Exception
33 {
34 super(name);
35 }
36
37 public void testGetDefaultCharSetWithMimeType()
38 {
39 Turbine.getConfiguration().setProperty(
40 TurbineConstants.LOCALE_DEFAULT_CHARSET_KEY,
41 "");
42 Turbine.getConfiguration().setProperty(
43 TurbineConstants.LOCALE_DEFAULT_COUNTRY_KEY,
44 "UK");
45 DefaultTurbineRunData runData =
46 new DefaultTurbineRunData();
47 assertEquals("ISO-8859-1", runData.getDefaultCharSet());
48
49 }
50
51 public void setUp() throws Exception
52 {
53 tc =
54 new TurbineConfig(
55 ".",
56 "/conf/test/TestFulcrumComponents.properties");
57 tc.initialize();
58 }
59 public void tearDown() throws Exception
60 {
61 if (tc != null)
62 {
63 tc.dispose();
64 }
65 }
66
67 }