symbianunittestui/qt/testitemlist.h
changeset 2 453d490c84a5
parent 1 753e33780645
child 3 6952856dc269
equal deleted inserted replaced
1:753e33780645 2:453d490c84a5
     1 /*
       
     2  * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description: class to setup mapping of individual test cases and dll files.
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef TESTITEMLIST_H_
       
    19 #define TESTITEMLIST_H_
       
    20 #include <QString>
       
    21 #include <QStringList>
       
    22 #include <QList>
       
    23 
       
    24 class TestItemList
       
    25     {    
       
    26 public:
       
    27     TestItemList();
       
    28     ~TestItemList();
       
    29 
       
    30 public:
       
    31     void removeItem(const QString&);
       
    32     void removeAll();
       
    33     void removeOneSubItem(const QString&, const QString&);
       
    34     void addItemExclusively(const QString&, const QStringList&);
       
    35     void addItemExclusively(const QString&);
       
    36     void addOneSubItem(const QString&, const QString&);
       
    37     int count() const;
       
    38     bool isEqual(const TestItemList*);
       
    39     bool empty() const;
       
    40     bool exists(const QString&) const;
       
    41     QStringList items() const;
       
    42     QStringList subItems() const;
       
    43     
       
    44 private:
       
    45     class TestItem
       
    46         {
       
    47     public:
       
    48         TestItem();
       
    49         TestItem(QString, QStringList);
       
    50         ~TestItem();
       
    51 
       
    52     public:
       
    53         QString getFullQulifiedCaseName(const QString&);
       
    54         bool isEqual(const TestItem&);
       
    55 
       
    56     public:
       
    57         QString itemName;
       
    58         QStringList subItemNames;
       
    59         };
       
    60     
       
    61 private:
       
    62     bool findItem(const QString&, TestItem*&) const;
       
    63     
       
    64 private:
       
    65     QList<TestItem*> listItems;
       
    66     
       
    67     };
       
    68 
       
    69 #endif /* TESTITEMLIST_H_ */