FileDocCategorySizeDatePackage
LocaleWebTest.javaAPI DocExample862Tue Oct 12 15:58:14 BST 2004com.oreilly.strutsckbk.ch13

LocaleWebTest

public class LocaleWebTest extends net.sourceforge.jwebunit.WebTestCase

Fields Summary
private net.sourceforge.jwebunit.TestContext
testContext
Constructors Summary
public LocaleWebTest(String name)

        super(name);
    
Methods Summary
public voidsetUp()

        testContext = getTestContext();
        testContext.setBaseUrl("http://localhost/jsc-ch13");
        testContext.setResourceBundleName(
            "org.apache.struts.webapp.example.ApplicationResources"
        );
    
public voidtestRussian()

        testContext.setLocale(new Locale("ru"));
        testContext.getWebClient().setHeaderField("Accept-Language","ru");
        beginAt("/index.jsp");
        assertTitleEqualsKey("index.title");