pimappservices/calendar/tsrc/TestCalIndexFile/src/TestCalIndexFileBandRStep.cpp
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 // Copyright (c) 2006-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 "TestCalIndexFileBandRStep.h"
       
    17 #include <fbs.h>
       
    18 #include <e32math.h>
       
    19 #include <calcategory.h>
       
    20 #include <caldataexchange.h>
       
    21 #include <caldataformat.h>
       
    22 #include <calsession.h>
       
    23 #include <s32file.h>
       
    24 
       
    25 
       
    26 CTestCalIndexFileBandRStep::~CTestCalIndexFileBandRStep()
       
    27 /**
       
    28  * Destructor
       
    29  */
       
    30 	{
       
    31 	}
       
    32 
       
    33 CTestCalIndexFileBandRStep::CTestCalIndexFileBandRStep()
       
    34 /**
       
    35  * Constructor
       
    36  */
       
    37 	{
       
    38 	SetTestStepName(KTestCalIndexFileBandRStep);
       
    39 	}
       
    40 
       
    41 TVerdict CTestCalIndexFileBandRStep::doTestStepPostambleL()
       
    42 	{
       
    43 	return TestStepResult();
       
    44 	}
       
    45 
       
    46 TVerdict CTestCalIndexFileBandRStep::doTestStepL()
       
    47 	{
       
    48 	// this method assumes a pass. Checks that fail will stop
       
    49 	// the test step
       
    50 	
       
    51 	SetUpCalDirL();
       
    52 	
       
    53 	AddCalendarFileL();
       
    54 	AddIndexFileL();
       
    55 	
       
    56 	BackupL();
       
    57 	RestoreL();
       
    58 	
       
    59 	// After a backup and restore the calendar file should be 
       
    60 	// present but the index file should be gone.
       
    61 	if (!CheckCalendarFilePresentL())
       
    62 		{
       
    63 		SetTestStepResult(EFail);
       
    64 		return EFail;
       
    65 		}
       
    66 		
       
    67 	if (CheckIndexFilePresentL())
       
    68 		{
       
    69 		SetTestStepResult(EFail);
       
    70 		return EFail;
       
    71 		}
       
    72 
       
    73 	return EPass;
       
    74 	}
       
    75 
       
    76 void CTestCalIndexFileBandRStep::BackupL()
       
    77 	{
       
    78 	}
       
    79 	
       
    80 void CTestCalIndexFileBandRStep::RestoreL()
       
    81 	{
       
    82 	}
       
    83 	
       
    84