use of com.agiletec.apsadmin.category.CategoryAction in project entando-core by entando.
the class TestTrashReferencedCategory method testTrashReferencedCategory.
public void testTrashReferencedCategory() throws Throwable {
String categoryCode = "evento";
Category masterCategory = this._categoryManager.getCategory(categoryCode);
assertNotNull(masterCategory);
try {
this.setUserOnSession("admin");
this.initAction("/do/Category", "trash");
this.addParameter("selectedNode", categoryCode);
String result = this.executeAction();
assertEquals("references", result);
CategoryAction action = (CategoryAction) this.getAction();
Map<String, List> references = action.getReferences();
assertEquals(2, references.size());
List contentReferences = references.get(JacmsSystemConstants.CONTENT_MANAGER + "Utilizers");
assertEquals(2, contentReferences.size());
for (int i = 0; i < contentReferences.size(); i++) {
String contentId = (String) contentReferences.get(i);
assertTrue(contentId.equals("EVN193") || contentId.equals("EVN192"));
}
} catch (Throwable t) {
throw t;
}
}
Aggregations