@Test
@Deprecated
public void testListAssets() throws Exception {
ServiceImplementation impl = getServiceImplementation();
RepositoryCategoryService repositoryCategoryService = getRepositoryCategoryService();
PackageItem pacakgeItem = impl.getRulesRepository().createPackage( "testListAssetsPackage",
"desc" );
repositoryCategoryService.createCategory( "",
"testListAssetsCat",
"this is a cat" );
impl.createNewRule( "testLoadArchivedAssets1",
"description",
"testListAssetsCat",
"testListAssetsPackage",
AssetFormats.BUSINESS_RULE );
impl.createNewRule( "testLoadArchivedAssets2",
"description",
"testListAssetsCat",
"testListAssetsPackage",
AssetFormats.BUSINESS_RULE );
impl.createNewRule( "testLoadArchivedAssets3",
"description",
"testListAssetsCat",
"testListAssetsPackage",
AssetFormats.BUSINESS_RULE );
impl.createNewRule( "testLoadArchivedAssets4",
"description",
"testListAssetsCat",
"testListAssetsPackage",
AssetFormats.BUSINESS_RULE );
impl.createNewRule( "testLoadArchivedAssets5",
"description",
"testListAssetsCat",
"testListAssetsPackage",
AssetFormats.BUSINESS_RULE );
RepositoryAssetService repositoryAssetService = getRepositoryAssetService();
TableDataResult res = repositoryAssetService.listAssets( pacakgeItem.getUUID(),
new String[]{AssetFormats.BUSINESS_RULE},
0,
2,
ExplorerNodeConfig.PACKAGEVIEW_LIST_TABLE_ID );
assertEquals( 2,
res.data.length );
assertTrue( 5 == res.total );
assertTrue( res.currentPosition == 2 );
assertTrue( res.hasNext );
res = repositoryAssetService.listAssets( pacakgeItem.getUUID(),
new String[]{AssetFormats.BUSINESS_RULE},
2,
2,
ExplorerNodeConfig.PACKAGEVIEW_LIST_TABLE_ID );
assertEquals( 2,