01: /******************************************************************************
02: * jWebUnit project (http://jwebunit.sourceforge.net) *
03: * Distributed open-source, see full license under LICENCE.txt *
04: ******************************************************************************/package net.sourceforge.jwebunit.tests;
05:
06: import junit.framework.Test;
07: import junit.framework.TestSuite;
08: import net.sourceforge.jwebunit.tests.util.JettySetup;
09:
10: /**
11: * Make sure JWebUnit handles character conversions properly.
12: *
13: * @author <a href="mailto:jesse@swank.ca">Jesse Wilson</a>
14: */
15: public class CharsetTest extends JWebUnitAPITestCase {
16: public CharsetTest(String name) {
17: super (name);
18: }
19:
20: public static Test suite() {
21: return new JettySetup(new TestSuite(CharsetTest.class));
22: }
23:
24: public void setUp() throws Exception {
25: super .setUp();
26: getTestContext().setBaseUrl(HOST_PATH + "/CharsetTest");
27: beginAt("/charset.html_utf-8");
28: }
29:
30: public void testEuro() {
31: assertTextFieldEquals("eur", "\u20AC");
32: }
33:
34: public void testDollar() {
35: assertTextFieldEquals("usd", "$");
36: }
37:
38: public void testYen() {
39: assertTextFieldEquals("yen", "\u00A5");
40: }
41:
42: public void testPound() {
43: assertTextFieldEquals("gbp", "\u00A3");
44: }
45: }
|