camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxesettingsimp/unittest_cxesettingsimp.h
changeset 46 c826656d6714
parent 19 d9aefe59d544
equal deleted inserted replaced
42:feebad15db8c 46:c826656d6714
     1 /*
     1 /*
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3  * All rights reserved.
     3  * All rights reserved.
     4  * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5  * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6  * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     9  * Initial Contributors:
     9  * Initial Contributors:
    10  * Nokia Corporation - initial contribution.
    10  * Nokia Corporation - initial contribution.
    11  *
    11  *
    12  * Contributors:
    12  * Contributors:
    13  *
    13  *
    14  * Description:
    14  * Description: This test class contains unit tests for two cxengine classes:
       
    15  * CxeSettings and CxeSettingsImp. CxeSettings is mostly a pure virtual
       
    16  * class containing couple of overloaded versions of get() methods, and so it is
       
    17  * tested together with CxeSettingsImp, which implements CxeSettings
    15  *
    18  *
    16  */
    19  */
    17 #ifndef UNITTEST_CXESETTINGSIMP_H
    20 #ifndef UNITTEST_CXESETTINGSIMP_H
    18 #define UNITTEST_CXESETTINGSIMP_H
    21 #define UNITTEST_CXESETTINGSIMP_H
    19 
    22 
    20 #include <QObject>
    23 #include <QObject>
    21 #include <QMetaType>
       
    22 
       
    23 #include "cxesettingsimp.h"
    24 #include "cxesettingsimp.h"
    24 
    25 
    25 class CxeFakeSettingsModel;
    26 class CxeFakeSettingsStore;
    26 class CxeSettingsImp;
    27 class CxeSettingsImp;
    27 
    28 
    28 class UnitTestCxeSettingsImp : public QObject
    29 class UnitTestCxeSettingsImp : public QObject
    29 {
    30 {
    30 Q_OBJECT
    31 Q_OBJECT
    31 
    32 
    32 public:
    33 public:
    33     UnitTestCxeSettingsImp();
    34     UnitTestCxeSettingsImp();
    34     virtual ~UnitTestCxeSettingsImp();
    35     virtual ~UnitTestCxeSettingsImp();
    35 
    36 
       
    37 public slots:
       
    38     void testSlot();
       
    39 
    36 private slots:
    40 private slots:
    37     void init();
    41     void init();
    38     void cleanup();
    42     void cleanup();
    39 
    43 
       
    44     void testLoadImageSettings();
       
    45     void testLoadVideoSettings();
       
    46     void testLoadImageAndVideoSettings();
       
    47 
    40     void testGet();
    48     void testGet();
    41     void testGet2();
    49     void testGet2();
       
    50     void testGet3();
       
    51     void testGetGarbage();
    42     void testSet();
    52     void testSet();
    43     void testLoadSettings();
    53 
       
    54     void testReset();
       
    55     void testGetVariationSetting();
       
    56     void testListenForSetting();
    44 
    57 
    45 private:
    58 private:
    46 
    59 
    47     CxeFakeSettingsModel *mSettingsModel;
    60     CxeFakeSettingsStore *mSettingsStore;
    48     CxeSettingsImp *mSettingsImp;
    61     CxeSettingsImp *mSettingsImp;
    49 };
    62 };
    50 
    63 
    51 Q_DECLARE_METATYPE(CxeScene)
       
    52 
       
    53 #endif
    64 #endif
    54 
    65