diff options
author | Wolf Bergenheim <ext-wolf.2.bergenheim@nokia.com> | 2010-01-29 17:20:56 +0200 |
---|---|---|
committer | Wolf Bergenheim <ext-wolf.2.bergenheim@nokia.com> | 2010-01-29 17:20:56 +0200 |
commit | 0746bbd252fe13ce3c4ae523fc28b0cf27314c05 (patch) | |
tree | 323b3406c6f893f21c7c7820532c0df2a61881cc /tests/test-resource.h | |
parent | 27c45e867533ad43bc2b2e64fe577a503b2d05a8 (diff) |
Refactored Resource into multiple classes
Diffstat (limited to 'tests/test-resource.h')
-rw-r--r-- | tests/test-resource.h | 49 |
1 files changed, 30 insertions, 19 deletions
diff --git a/tests/test-resource.h b/tests/test-resource.h index b0e6964..fc04c47 100644 --- a/tests/test-resource.h +++ b/tests/test-resource.h @@ -3,7 +3,7 @@ #include <QtTest/QTest> #include <QMetaType> -#include "resource.h" +#include "resources.h" Q_DECLARE_METATYPE(ResourcePolicy::ResourceType) @@ -11,33 +11,44 @@ using namespace ResourcePolicy; class TestResource: public QObject { - Q_OBJECT + Q_OBJECT private: - Resource *resource; - + AudioResource *audioResource; + AudioRecorderResource *audioRecorderResource; + Resource *videoResource; + Resource *videoRecorderResource; + Resource *vibraResource; + Resource *ledsResource; + Resource *backlightResource; + Resource *systemButtonResource; + Resource *lockButtonResource; + Resource *scaleButtonResource; + Resource *snapButtonResource; + Resource *lensCoverResource; + + Resource * resourceFromType(ResourceType type); + const char * stringFromType(ResourceType type); public: - TestResource(); - ~TestResource(); + TestResource(); + ~TestResource(); private slots: - void init(); - void cleanup(); + void init(); + void cleanup(); + + void testType(); - void testType_data(); - void testType(); - - void testOptional_data(); - void testOptional(); + void testOptional_data(); + void testOptional(); - void testShared_data(); - void testShared(); + void testShared_data(); + void testShared(); - void testCopy(); - void testCopyConstructor(); + void testGranted_data(); + void testGranted(); - void testEqualsOperator(); - void testEqualsOperatorWithDifferentTypes(); + void testClone(); }; #endif |