{
WikiEditPage edit = WikiEditPage.gotoPage("Test", "LanguageTest");
edit.setContent("{{velocity}}context = ($xcontext.language), doc = ($doc.language), "
+ "default = ($doc.defaultLanguage), tdoc = ($tdoc.language), "
+ "tdocdefault = ($tdoc.defaultLanguage){{/velocity}}");
ViewPage vp = edit.clickSaveAndView();
// Current language must be "en"
Assert.assertEquals("Invalid content", vp.getContent(),
"context = (en), doc = (), default = (en), tdoc = (), tdocdefault = (en)");
// Change default language to "fr"
AdministrationPage adminPage = AdministrationPage.gotoPage();
LocalizationAdministrationSectionPage sectionPage = adminPage.clickLocalizationSection();
sectionPage.setDefaultLanguage("fr");
sectionPage.clickSave();
// Now language must be "fr"
vp = getUtil().gotoPage("Test", "LanguageTest");
Assert.assertTrue("Page not in French!", isPageInFrench());
Assert.assertEquals("Invalid content", vp.getContent(),
"context = (fr), doc = (), default = (en), tdoc = (), tdocdefault = (en)");
}