List of usage examples for com.liferay.portal.kernel.service ResourceActionLocalServiceUtil getResourceActionsCount
public static int getResourceActionsCount(String name)
From source file:com.liferay.asset.service.test.AssetVocabularyServiceTest.java
License:Open Source License
@Test public void testDeleteVocabulary() throws Exception { int initialAssetCategoriesCount = searchCount(); int initialResourcesActionsCount = ResourceActionLocalServiceUtil .getResourceActionsCount(AssetVocabulary.class.getName()); AssetVocabulary vocabulary = AssetTestUtil.addVocabulary(_group.getGroupId()); AssetCategory category = AssetTestUtil.addCategory(_group.getGroupId(), vocabulary.getVocabularyId()); AssetTestUtil.addCategory(_group.getGroupId(), vocabulary.getVocabularyId(), category.getCategoryId()); Assert.assertEquals(initialAssetCategoriesCount + 2, searchCount()); AssetVocabularyLocalServiceUtil.deleteVocabulary(vocabulary.getVocabularyId()); Assert.assertEquals(initialAssetCategoriesCount, searchCount()); Assert.assertEquals(initialResourcesActionsCount, ResourceActionLocalServiceUtil.getResourceActionsCount(AssetVocabulary.class.getName())); Assert.assertNull(AssetCategoryLocalServiceUtil.fetchAssetCategory(category.getCategoryId())); Assert.assertNull(AssetVocabularyLocalServiceUtil.fetchAssetVocabulary(vocabulary.getVocabularyId())); }