videocollection/videocollectionwrapper/tsrc/testvideosortfilterproxymodel/inc/testvideosortfilterproxymodel.h
changeset 34 bbb98528c666
parent 30 4f111d64a341
child 35 3738fe97f027
--- a/videocollection/videocollectionwrapper/tsrc/testvideosortfilterproxymodel/inc/testvideosortfilterproxymodel.h	Thu Apr 01 23:13:36 2010 +0300
+++ b/videocollection/videocollectionwrapper/tsrc/testvideosortfilterproxymodel/inc/testvideosortfilterproxymodel.h	Thu Apr 01 23:22:15 2010 +0300
@@ -25,6 +25,7 @@
 class VideoListDataModel;
 class FilterProxyTester;
 class VideoCollectionClient;
+class VideoSortFilterProxyModel;
 
 class TestVideoSortFilterProxyModel : public QObject
 {
@@ -55,16 +56,6 @@
      * Test initialize with null model causing connect to fail.
      */
     void testInitializeSignalConnectFail();
-    
-    /**
-     * Test when model init fails. 
-     */
-    void testInitializeDataModelInitFail();
-    
-    /**
-	 * Test when collection init fails. 
-	 */
-    void testInitializeCollectionInitFail();
         
     /**
      * Test second call to initialize with valid data.
@@ -72,11 +63,6 @@
     void testSecondInitialize();
     
     /**
-	 * Test second call to initialize when model init fails. 
-	 */
-    void testSecondInitializeModelInitFail();
-    
-    /**
      * Test open.
      */
     void testOpen();
@@ -97,24 +83,24 @@
     void testDeleteItemsRemoveRowsFail();
 
     /**
-     * Test openItem with valid data.
-     */
-    void testOpenItem();
-
-    /**
      * Test openItem when getMediaId fails.
      */
-    void testOpenItemGetMediaIdFail();    
+    void testOpenItemInvalidId();    
 
     /**
-     * Test openItem when model is NULL.
+     * Test openItem when collection is NULL.
      */
-    void testOpenItemModelNull();
+    void testOpenItemCollectionNull();
     
     /**
      * Test openItem when openVideo fails.
      */
     void testOpenItemOpenVideoFails();
+    
+    /**
+    * Test openItem with valid data.
+    */
+    void testOpenItem();
 
     /**
      * Test back with valid data.
@@ -142,9 +128,9 @@
     void testFetchItemDetailsGetVideoDetailsFails();
 
     /**
-     * Test lessThan when initialize has not been called.
+     * Test lessThan when there's no mModel.
      */
-    void testLessThanProxyModelNotInitialized();
+    void testLessThanNoModel();
     
     /**
      * Calls sure lessThan with Qt::DisplayRole setted on 
@@ -178,11 +164,6 @@
     void testDoSorting();
     
     /**
-     * Test filterAcceptsRow when initialize has not been called.
-     */
-    void testFilterAcceptsRowProxyModelNotInitialized();
-    
-    /**
      * Calls filterAcceptsRow.
      * Tests that return values are correct with items with varying statuses. 
      * 
@@ -205,13 +186,39 @@
     void testAddNewCollectionSucceed();
     
     /**
-     * Tests calling addNewCollection where collection client returns -1.
+     * tests resolveAlbumName
+     */
+    void testResolveAlbumName();
+    
+    /**
+     * tests addItemsInAlbum
      */
-    void testAddNewCollectionFail();
+    void testAddItemsInAlbum();
+    
+    /**
+     * tests getOpenItem
+     */
+    void testGetOpenItem();
     
-public slots:
-	
-	int testShortDetailsReadySlot(int index);
+    /**
+     * tests removeAlbums
+     */
+    void testRemoveAlbums();
+    
+    /**
+     * tests albumChangedSlot
+     */
+    void testAlbumChangedSlot();
+    
+    /**
+     * tests indexOfId
+     */
+    void testIndexOfId();
+    
+    /**
+     * tests setGenericIdFilter
+     */
+    void testSetGenericIdFilter();
     
 private:
     
@@ -230,6 +237,11 @@
      * implemented to be able to call protected objects
      */
     FilterProxyTester *mTestObject;
+    
+    /**
+     * dummy collections content proxy
+     */
+    VideoSortFilterProxyModel *mCollectionModel;
 };