cellular/psetnotesui/tsrc/public/basic/Src/T_PSetNotesUi.cpp
changeset 51 12bc758d6a02
parent 48 78df25012fda
child 53 25b8d29b7c59
equal deleted inserted replaced
48:78df25012fda 51:12bc758d6a02
     1 /*
       
     2 * Copyright (c) 2006 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: Implementation of T_PSetNotesUi class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 //  CLASS HEADER
       
    20 #include "T_PSetNotesUi.h"
       
    21 
       
    22 //  EXTERNAL INCLUDES
       
    23 #include <EUnitMacros.h>
       
    24 #include <EUnitDecorators.h>
       
    25 #include <psuicontainer.h>
       
    26 
       
    27 //  INTERNAL INCLUDES
       
    28 
       
    29 
       
    30 // CONSTRUCTION
       
    31 T_PSetNotesUi* T_PSetNotesUi::NewL()
       
    32     {
       
    33     T_PSetNotesUi* self = T_PSetNotesUi::NewLC();
       
    34     CleanupStack::Pop();
       
    35 
       
    36     return self;
       
    37     }
       
    38 
       
    39 T_PSetNotesUi* T_PSetNotesUi::NewLC()
       
    40     {
       
    41     T_PSetNotesUi* self = new( ELeave ) T_PSetNotesUi();
       
    42     CleanupStack::PushL( self );
       
    43 
       
    44     self->ConstructL();
       
    45 
       
    46     return self;
       
    47     }
       
    48 
       
    49 // Destructor (virtual by CBase)
       
    50 T_PSetNotesUi::~T_PSetNotesUi()
       
    51     {
       
    52     }
       
    53 
       
    54 // Default constructor
       
    55 T_PSetNotesUi::T_PSetNotesUi()
       
    56     {
       
    57     }
       
    58 
       
    59 // Second phase construct
       
    60 void T_PSetNotesUi::ConstructL()
       
    61     {
       
    62     // The ConstructL from the base class CEUnitTestSuiteClass must be called.
       
    63     // It generates the test case table.
       
    64     CEUnitTestSuiteClass::ConstructL();
       
    65     }
       
    66 
       
    67 //  METHODS
       
    68 
       
    69 
       
    70 void T_PSetNotesUi::SetupL(  )
       
    71     {
       
    72     iContainer = CPsuiContainer::NewL();
       
    73     }
       
    74     
       
    75 
       
    76 void T_PSetNotesUi::Teardown(  )
       
    77     {
       
    78     delete iContainer;
       
    79     }
       
    80  
       
    81 void T_PSetNotesUi::T_TestL()
       
    82     {
       
    83     }
       
    84     
       
    85 void T_PSetNotesUi::T_Test2L()
       
    86     {
       
    87     CPsuiWaitingObs* waitingObs = iContainer->CreateCWObsL();
       
    88     delete waitingObs;
       
    89     }
       
    90     
       
    91 void T_PSetNotesUi::T_Test3L()
       
    92     {
       
    93     CPsuiDivertObs* divertObs = iContainer->CreateCFObsL();
       
    94     delete divertObs;
       
    95     }    
       
    96     
       
    97 void T_PSetNotesUi::T_Test4L()
       
    98     {
       
    99     CPsuiBarringObs* cbObs = iContainer->CreateCBObsL();
       
   100     delete cbObs;
       
   101     }
       
   102 
       
   103 void T_PSetNotesUi::T_Test5L()
       
   104     {
       
   105     CPsuiCliObserver* cliObs = iContainer->CreateCliObsL();
       
   106     delete cliObs;
       
   107     }     
       
   108              
       
   109 //  TEST TABLE
       
   110 EUNIT_BEGIN_TEST_TABLE(
       
   111     T_PSetNotesUi,
       
   112     "Add test suite description here.",
       
   113     "MODULE" )
       
   114 
       
   115 EUNIT_TEST(
       
   116     "CPsuiContainer::NewL",
       
   117     "",
       
   118     "CPsuiContainer::NewL",
       
   119     "FUNCTIONALITY",
       
   120     SetupL, T_TestL, Teardown)
       
   121 
       
   122 EUNIT_TEST(
       
   123     "CreateCWObsL",
       
   124     "",
       
   125     "CreateCWObsL",
       
   126     "FUNCTIONALITY",
       
   127     SetupL, T_Test2L, Teardown)    
       
   128 
       
   129 EUNIT_TEST(
       
   130     "CreateCFObsL",
       
   131     "",
       
   132     "CreateCFObsL",
       
   133     "FUNCTIONALITY",
       
   134     SetupL, T_Test3L, Teardown)  
       
   135     
       
   136 EUNIT_TEST(
       
   137     "CreateCBObsL",
       
   138     "",
       
   139     "CreateCBObsL",
       
   140     "FUNCTIONALITY",
       
   141     SetupL, T_Test4L, Teardown)
       
   142 
       
   143 EUNIT_TEST(
       
   144     "CreateCliObsL",
       
   145     "",
       
   146     "CreateCliObsL",
       
   147     "FUNCTIONALITY",
       
   148     SetupL, T_Test5L, Teardown)        
       
   149       
       
   150 EUNIT_END_TEST_TABLE
       
   151 
       
   152 //  END OF FILE