"x",
cat,
"testListByFormat",
"testListByFormat" );
TableDataResult res = impl.listAssets( pkgUUID,
arr( "testListByFormat" ),
0,
-1,
AssetItemGrid.RULE_LIST_TABLE_ID );
assertEquals( 4,
res.data.length );
assertEquals( uuid,
res.data[0].id );
assertEquals( "testListByFormat",
res.data[0].values[0] );
res = impl.listAssets( pkgUUID,
arr( "testListByFormat" ),
0,
4,
AssetItemGrid.RULE_LIST_TABLE_ID );
assertEquals( 4,
res.data.length );
res = impl.listAssets( pkgUUID,
arr( "testListByFormat" ),
0,
2,
AssetItemGrid.RULE_LIST_TABLE_ID );
assertEquals( 2,
res.data.length );
assertEquals( uuid,
res.data[0].id );
assertEquals( 4,
res.total );
assertTrue( res.hasNext );
res = impl.listAssets( pkgUUID,
arr( "testListByFormat" ),
2,
2,
AssetItemGrid.RULE_LIST_TABLE_ID );
assertEquals( 2,
res.data.length );
assertEquals( uuid3,
res.data[0].id );
assertEquals( 4,
res.total );
assertFalse( res.hasNext );
uuid = impl.createNewRule( "testListByFormat5",
"x",
cat,
"testListByFormat",
"otherFormat" );
res = impl.listAssets( pkgUUID,
arr( "otherFormat" ),
0,
40,
AssetItemGrid.RULE_LIST_TABLE_ID );
assertEquals( 1,
res.data.length );
assertEquals( uuid,
res.data[0].id );
res = impl.listAssets( pkgUUID,
new String[]{"otherFormat", "testListByFormat"},
0,
40,
AssetItemGrid.RULE_LIST_TABLE_ID );
assertEquals( 5,
res.data.length );
TableDataResult result = impl.quickFindAsset( "testListByForma",
false,
0,
5 );
assertEquals( 5,
result.data.length );