pimappservices/calendar/tsrc/TestCalIndexFile/src/TestCalIndexFileOpenwithIndexStep.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 "TestCalIndexFileOpenwithIndexStep.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 CTestCalIndexFileOpenwithIndexStep::~CTestCalIndexFileOpenwithIndexStep()
       
    27 /**
       
    28  * Destructor
       
    29  */
       
    30 	{
       
    31 	}
       
    32 
       
    33 CTestCalIndexFileOpenwithIndexStep::CTestCalIndexFileOpenwithIndexStep()
       
    34 /**
       
    35  * Constructor
       
    36  */
       
    37 	{
       
    38 	SetTestStepName(KTestCalIndexFileOpenwithIndexStep);
       
    39 	}
       
    40 
       
    41 TVerdict CTestCalIndexFileOpenwithIndexStep::doTestStepPostambleL()
       
    42 	{
       
    43 	return TestStepResult();
       
    44 	}
       
    45 
       
    46 TVerdict CTestCalIndexFileOpenwithIndexStep::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 	// insure that we can open with the given index file
       
    57 	OpenAgendaL();
       
    58 	if (!ValidateDbContentsL())
       
    59 		{
       
    60 		INFO_PRINTF1(_L("Open with Index Step Failed validating DB contents without idx file"));
       
    61 		CloseAgendaL();
       
    62 		SetTestStepResult(EFail);
       
    63 		return EFail;
       
    64 		}	
       
    65 	CloseAgendaL();
       
    66 
       
    67 	SetTestStepResult(EPass);
       
    68 	return EPass;
       
    69 	}