diff -r 17f382c040b1 -r 518105d52e45 videocollection/videocollectionview/tsrc/testvideocollectionviewutils/src/testvideocollectionviewutils.cpp --- a/videocollection/videocollectionview/tsrc/testvideocollectionviewutils/src/testvideocollectionviewutils.cpp Fri Jul 02 17:14:33 2010 +0300 +++ b/videocollection/videocollectionview/tsrc/testvideocollectionviewutils/src/testvideocollectionviewutils.cpp Thu Jul 08 13:05:19 2010 +0300 @@ -16,6 +16,7 @@ */ #include +#include "xqsettingsmanagerstub.h" #include #include "centralrepository.h" #include "testvideocollectionviewutils.h" @@ -518,60 +519,21 @@ } // ----------------------------------------------------------------------------- -// testGetServiceIconStrings +// testGetCenRepStringValue // ----------------------------------------------------------------------------- // -void TestVideoVideoCollectionViewUtils::testGetServiceIconStrings() -{ - VideoCollectionViewUtils &testObject(VideoCollectionViewUtils::instance()); - CRepository::setNewLLeave(true); - _LIT(KExpectedTDesValue, "expected"); - CRepository::setTDesValue(KExpectedTDesValue()); - QString expected((QChar*)KExpectedTDesValue().Ptr(),KExpectedTDesValue().Length()); - - QString icon; - QString pressed; - QVERIFY(testObject.getServiceIconStrings(icon, pressed) < 0); - QVERIFY(icon.isNull()); - QVERIFY(pressed.isNull()); +void TestVideoVideoCollectionViewUtils::testGetCenRepStringValue() +{ - CRepository::setNewLLeave(false); - CRepository::setGetFail(0); - QVERIFY(testObject.getServiceIconStrings(icon, pressed) < 0); - QVERIFY(icon.isNull()); - QVERIFY(pressed.isNull()); - - CRepository::setGetFail(1); - QVERIFY(testObject.getServiceIconStrings(icon, pressed) < 0); - QVERIFY(icon.isNull()); - QVERIFY(pressed.isNull()); - - CRepository::setGetFail(255); - QVERIFY(testObject.getServiceIconStrings(icon, pressed) == 0); - QCOMPARE(icon, expected); - QCOMPARE(pressed, expected); } // ----------------------------------------------------------------------------- -// testGetServiceIconStrings +// testGetCenRepIntValue // ----------------------------------------------------------------------------- // -void TestVideoVideoCollectionViewUtils::testGetServiceUriString() -{ - VideoCollectionViewUtils &testObject(VideoCollectionViewUtils::instance()); - CRepository::setNewLLeave(true); - _LIT(KExpectedTDesValue, "expected"); - CRepository::setTDesValue(KExpectedTDesValue()); - QString expected((QChar*)KExpectedTDesValue().Ptr(),KExpectedTDesValue().Length()); +void TestVideoVideoCollectionViewUtils::testGetCenRepIntValue() +{ - QVERIFY(testObject.getServiceUriString().isNull()); - - CRepository::setNewLLeave(false); - CRepository::setGetFail(0); - QVERIFY(testObject.getServiceUriString().isNull()); - - CRepository::setGetFail(255); - QCOMPARE(testObject.getServiceUriString(), expected); } // -----------------------------------------------------------------------------