private static MultilanguageContent getACategoryMultiName() { MultilanguageContent mCategory = new MultilanguageContent(); for (MultilanguageContent.Lang lang : MultilanguageContent.Lang.values()) { mCategory.setLangString(lang, Testing.randomString(15)); } return mCategory; }
private static void testCategory() { MultilanguageContent mCategory = SiteTest.getACategoryMultiName(); MultilanguageContent mSubCategory = SiteTest.getACategoryMultiName(); MultilanguageContent mSubSubCategory = SiteTest.getACategoryMultiName(); Testing.so("Setting category: " + mCategory, Format.STEP); try { SiteTest.site.setCategory(mCategory, mSubCategory, mSubSubCategory); SiteTest.properties.put("category", mCategory.toString()); SiteTest.properties.put("subcategory", mSubCategory.toString()); SiteTest.properties.put("subsubcategory", mSubSubCategory.toString()); } catch (Exception e) { Testing.err(e); } }