1363 indexList.append(mTestObject->index(2,0)); |
1363 indexList.append(mTestObject->index(2,0)); |
1364 |
1364 |
1365 // no albums in model |
1365 // no albums in model |
1366 QVERIFY(mTestObject->removeAlbums(indexList) == -1); |
1366 QVERIFY(mTestObject->removeAlbums(indexList) == -1); |
1367 |
1367 |
|
1368 indexList.clear(); |
1368 mStubModel->removeAll(); |
1369 mStubModel->removeAll(); |
1369 delete mTestObject; |
1370 delete mTestObject; |
1370 mTestObject = new FilterProxyTester(VideoCollectionCommon::EModelTypeCollections); |
1371 mTestObject = new FilterProxyTester(VideoCollectionCommon::EModelTypeCollections); |
1371 QVERIFY(mTestObject); |
1372 QVERIFY(mTestObject); |
1372 QVERIFY(mTestObject->initialize(mStubModel) == 0); |
1373 QVERIFY(mTestObject->initialize(mStubModel) == 0); |
1373 QVERIFY(mTestObject->open(VideoCollectionCommon::ELevelCategory) == 0); |
1374 QVERIFY(mTestObject->open(VideoCollectionCommon::ELevelCategory) == 0); |
1374 mStubModel->appendData(TMPXItemId(1,2)); |
1375 mStubModel->appendData(TMPXItemId(1,2)); |
1375 mStubModel->appendData(TMPXItemId(2,2)); |
1376 mStubModel->appendData(TMPXItemId(2,2)); |
1376 mStubModel->appendData(TMPXItemId(3,2)); |
1377 mStubModel->appendData(TMPXItemId(3,2)); |
1377 indexList.append(mTestObject->index(0,2)); |
1378 indexList.append(mTestObject->index(0,0)); |
1378 indexList.append(mTestObject->index(1,2)); |
1379 indexList.append(mTestObject->index(1,0)); |
1379 indexList.append(mTestObject->index(2,2)); |
1380 indexList.append(mTestObject->index(2,0)); |
1380 |
1381 |
1381 // succeed |
1382 // succeed |
1382 QVERIFY(mTestObject->removeAlbums(indexList) == 0); |
1383 QVERIFY(mTestObject->removeAlbums(indexList) == 0); |
1383 } |
1384 } |
1384 |
1385 |