Example usage for com.liferay.portal.kernel.util LocaleUtil CANADA

List of usage examples for com.liferay.portal.kernel.util LocaleUtil CANADA

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util LocaleUtil CANADA.

Prototype

Locale CANADA

To view the source code for com.liferay.portal.kernel.util LocaleUtil CANADA.

Click Source Link

Usage

From source file:com.liferay.journal.util.test.JournalTestUtilTest.java

License:Open Source License

@Test(expected = LocaleException.class)
public void testAddDDMStructureWithNonexistingLocale() throws Exception {
    Set<Locale> availableLocales = LanguageUtil.getAvailableLocales();
    Locale defaultLocale = LocaleUtil.getDefault();

    try {/*  w  w  w. j  a  v  a  2 s  .c om*/
        CompanyTestUtil.resetCompanyLocales(PortalUtil.getDefaultCompanyId(), Arrays.asList(LocaleUtil.US),
                LocaleUtil.US);

        DDMStructureTestUtil.addStructure(JournalArticle.class.getName(), LocaleUtil.CANADA);
    } finally {
        CompanyTestUtil.resetCompanyLocales(PortalUtil.getDefaultCompanyId(), availableLocales, defaultLocale);
    }
}