phonebookengines/contactsmodel/tsrc/Integration/TestImpExvCard/src/TestImpNoBDay.cpp
changeset 0 e686773b3f54
child 24 0ba2181d7c28
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include "TestImpNoBDay.h"
       
    17 
       
    18 CTestImpNoBDay::~CTestImpNoBDay()
       
    19 /**
       
    20  * Destructor
       
    21  */
       
    22 	{
       
    23 	}
       
    24 
       
    25 CTestImpNoBDay::CTestImpNoBDay()
       
    26 /**
       
    27  * Constructor
       
    28  */
       
    29 	{
       
    30 	// Call base class method to set up the human readable name for logging
       
    31 	SetTestStepName(KTestImpNoBDay);
       
    32 	}
       
    33 
       
    34 TVerdict CTestImpNoBDay::doTestStepPreambleL()
       
    35 /**
       
    36  * @return - TVerdict code
       
    37  * Override of base class virtual
       
    38  */
       
    39 	{
       
    40 	INFO_PRINTF1(_L("Start Import of vCards (BDay not present) Tests"));
       
    41 	
       
    42 	iScheduler = new (ELeave) CActiveScheduler;
       
    43 	CActiveScheduler::Install(iScheduler);
       
    44 	
       
    45 	SetTestStepResult(EPass);
       
    46 	return TestStepResult();
       
    47 	}
       
    48 
       
    49 TVerdict CTestImpNoBDay::doTestStepL()
       
    50 /**
       
    51  * @return - TVerdict code
       
    52  * Override of base class pure virtual
       
    53  */
       
    54 	{
       
    55 	SetTestStepResult(EFail);
       
    56 		
       
    57 	for (TInt i =0; i<2; i++)
       
    58 		{
       
    59 		INFO_PRINTF2(_L("TEST: %d"), i+1);
       
    60 		// test codes
       
    61 		TBuf<90> pathVCF(KPathImportNoBDay);
       
    62 		OpenBDAYVCFAndImportItemL(pathVCF, i); // Imports vcf 
       
    63 
       
    64 		// checks if Imported Birthday is NULL
       
    65 		if(iBDayFromImport == NULL) 
       
    66 			{
       
    67 			INFO_PRINTF1(_L("Imported Birthday is NULL (correct)"));
       
    68 			SetTestStepResult(EPass);
       
    69 			}
       
    70 		else
       
    71 			{
       
    72 			INFO_PRINTF1(_L("Imported Birthday is NOT NULL (incorrect)"));
       
    73 			SetTestStepResult(EFail);
       
    74 			return TestStepResult();
       
    75 			}	
       
    76 		}
       
    77 	
       
    78 	return TestStepResult();
       
    79 	}
       
    80 
       
    81 TVerdict CTestImpNoBDay::doTestStepPostambleL()
       
    82 /**
       
    83  * @return - TVerdict code
       
    84  * Override of base class virtual
       
    85  */
       
    86 	{
       
    87 	CActiveScheduler::Install(NULL);
       
    88 	delete iScheduler;
       
    89 	INFO_PRINTF1(_L("Completed Import of vCards (BDay not present) Tests"));
       
    90 	return TestStepResult();
       
    91 	}
       
    92