X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=ut%2Fut_remotelist%2Fut_remotelist.h;fp=ut%2Fut_remotelist%2Fut_remotelist.h;h=7db776452d3b9241053bd7cd4f5218dc225e56bc;hb=9d77c84418a946ce8f806b03e2db4d834122247a;hp=478ca28be7797b2565cb6ce219ad3be8ce855632;hpb=d126c41d6d968b7960497fa29aa0ee72d47b468d;p=irwi diff --git a/ut/ut_remotelist/ut_remotelist.h b/ut/ut_remotelist/ut_remotelist.h index 478ca28..7db7764 100644 --- a/ut/ut_remotelist/ut_remotelist.h +++ b/ut/ut_remotelist/ut_remotelist.h @@ -5,7 +5,10 @@ #include #include #include +#include + #include "model.h" +#include "remotelist.h" class Ut_RemoteList: public QObject { @@ -14,19 +17,32 @@ class Ut_RemoteList: public QObject private slots: void initTestCase(); void cleanupTestCase(); - void init(); - - void testSetContent(); + void testIsValid(); - void testIsValid_InvalidFile(); - void testIsValid_FileNotFound(); + void testIsValid_setContent(); void testLetters(); void testManufacturers(); void testModels(); + void testLetters_setContent(); + void testManufacturers_setContent(); + void testModels_setContent(); + +private: + // Creates the xml document containing the test data + void createDocument(); + + // Creates element for each mfg which name starts with the given letter. + void createMfgElements(QChar &letter, QDomElement &parent); + void createModelElements(const QString &mfg, QDomElement &parent); + + void compareLetters(RemoteList &subject); + void compareManufacturers(RemoteList &subject); + void compareModels(RemoteList &subject); private: - QMap validMfgs; // letter -- mfgs - QMap > validModels; // mfg ----- models + QDomDocument document; + QMap validMfgs; + QMap > validModels; }; #endif // UT_REMOTELIST_H