mpdata/tsrc/unittest_mpcollectiondatamodel/src/unittest_mpcollectiondatamodel.cpp
changeset 51 560ce2306a17
parent 35 fdb31ab341af
child 55 f3930dda3342
--- a/mpdata/tsrc/unittest_mpcollectiondatamodel/src/unittest_mpcollectiondatamodel.cpp	Fri Aug 06 16:51:36 2010 -0500
+++ b/mpdata/tsrc/unittest_mpcollectiondatamodel/src/unittest_mpcollectiondatamodel.cpp	Tue Aug 24 03:36:14 2010 -0500
@@ -30,6 +30,7 @@
 #include "unittest_helper.h"
 #include "stub/inc/mpcollectionalbumartmanager.h"
 #include "stub/inc/mpmpxcollectiondata.h"
+#include "stub/inc/mpplaybackdata.h"
 
 // Do this so we can access all member variables.
 #define private public
@@ -58,6 +59,7 @@
     : mTest(0),
       mHelper(0),
       mStubData(0),
+      mStubPlaybackData(0),
       mMpTranslator(0)
 {
 }
@@ -67,6 +69,7 @@
     delete mTest;
     delete mHelper;
     delete mStubData;
+    delete mStubPlaybackData;
     delete mMpTranslator;
 }
 
@@ -86,6 +89,7 @@
     }
 
     mStubData = new MpMpxCollectionData();
+    mStubPlaybackData = new MpPlaybackData(this);
     mHelper = new TestHelper();
 }
 
@@ -96,6 +100,8 @@
 {
     delete mStubData;
     mStubData = 0;
+    delete mStubPlaybackData;
+    mStubPlaybackData = 0;
     delete mHelper;
     mHelper = 0;
 }
@@ -105,7 +111,7 @@
  */
 void TestMpCollectionDataModel::init()
 {
-    mTest = new MpCollectionDataModel(mStubData);
+    mTest = new MpCollectionDataModel(mStubData, mStubPlaybackData);
     MpMpxCollectionData::resetItemDataCounter();
     mTest->mCollectionData->mItemDataReturn = true;
     mTest->mCollectionData->mCollectionTitleReturn = true;
@@ -966,4 +972,13 @@
     QCOMPARE(mTest->mAlbumIndexOffset, 0);
 }
 
+/*!
+ Tests fileCorrupted()
+ */
+void TestMpCollectionDataModel::testFileCorrupted()
+{
+    
+    
+}
+
 // End of file