phonebookengines/contactsmodel/tsrc/Integration/TestImpExvCard/src/TestImpNoRev.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 "TestImpNoRev.h"
       
    17 
       
    18 CTestImpNoRev::~CTestImpNoRev()
       
    19 /**
       
    20  * Destructor
       
    21  */
       
    22 	{
       
    23 	}
       
    24 
       
    25 CTestImpNoRev::CTestImpNoRev()
       
    26 /**
       
    27  * Constructor
       
    28  */
       
    29 	{
       
    30 	// Call base class method to set up the human readable name for logging
       
    31 	SetTestStepName(KTestImpNoRev);
       
    32 	}
       
    33 
       
    34 TVerdict CTestImpNoRev::doTestStepPreambleL()
       
    35 /**
       
    36  * @return - TVerdict code
       
    37  * Override of base class virtual
       
    38  */
       
    39 	{
       
    40 	INFO_PRINTF1(_L("Start Import of vCards (No REV) Tests"));
       
    41 	
       
    42 	iScheduler = new (ELeave) CActiveScheduler;
       
    43 	CActiveScheduler::Install(iScheduler);
       
    44 	
       
    45 	SetTestStepResult(EPass);
       
    46 	return TestStepResult();
       
    47 	}
       
    48 
       
    49 TVerdict CTestImpNoRev::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(KPathImportNoREv);
       
    62 		OpenVCFAndImportItemL(pathVCF, iFsSession, i); // Imports vcf 
       
    63 
       
    64 		if(iTimeFromImport == NULL) 
       
    65 			{
       
    66 			INFO_PRINTF1(_L("Imported Time is NULL (correct)"));
       
    67 			SetTestStepResult(EPass);
       
    68 			}
       
    69 		else
       
    70 			{
       
    71 			INFO_PRINTF1(_L("Imported Time is NOT NULL (incorrect)"));
       
    72 			SetTestStepResult(EFail);
       
    73 			return TestStepResult();
       
    74 			}	
       
    75 		}
       
    76 	
       
    77 	return TestStepResult();
       
    78 	}
       
    79 
       
    80 TVerdict CTestImpNoRev::doTestStepPostambleL()
       
    81 /**
       
    82  * @return - TVerdict code
       
    83  * Override of base class virtual
       
    84  */
       
    85 	{
       
    86 	CActiveScheduler::Install(NULL);
       
    87 	delete iScheduler;
       
    88 	INFO_PRINTF1(_L("Completed Import of vCards (No REV) Tests"));
       
    89 	return TestStepResult();
       
    90 	}