//! @File
//! @SYMTestSuiteName	SF-LBS-HYBRIDMTLR-FUTILE
//! @SYMScriptTestEnvironment TEF

// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

LOAD_SUITE SfLbsHybridMTLRTestServer -SharedData

PRINT Run SfLbsHybridMTLRTestServer


// Before we start LBS, select the test A-GPS integration module to use.
PREFIX RUN_UTILS
	MkDir c:\private\10282253\
	MkDir c:\private\10282253\lbs\
	MkDir c:\private\10282253\lbs\locmods\
        CopyFile c:\testdata\configs\ctagpshybridmoduledatasource.ini  c:\private\10282253\lbs\locmods\agpsintegmodule.ini
	CopyFile c:\testdata\configs\lbstestconfig.txt c:\config.txt
REMOVE_PREFIX

// Reset admin (reset will give us the EGpsPreferTerminalBased).
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_ResetDefaultAdmin

// Select MTLR privacy controller.
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_SetPrivacyHandler c:\testdata\configs\sf_lbs_mtlr.ini PrivHandler

// Use hybrid protocol module
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_SetupProtocolStub

RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs



START_TESTCASE SFLBS-HybridMTLR-Futile-0001
//!@SYMTestCaseID SFLBS-HybridMTLR-Futile-0001
//! @SYMTestCaseDesc            Description missing
//! @SYMTestPriority            High
//! @SYMTestActions             See test step Sequence inline comments
//! @SYMTestExpectedResults     Sequence as per specified by FSM and UML Seq diagram is Followed
//! @SYMTestType                CIT
//! @SYMCreationDate            28/8/2008
//! @SYMAuthor                  alans
//! @SYMTestStatus              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini HybridUEBasedFutile
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsHybridMtlrFutile c:\testdata\configs\sf_lbs_mtlr.ini HybridUEBasedFutile
END_TESTCASE SFLBS-HybridMTLR-Futile-0001


/////////////////////////////////////////////////////////////////////////

// It should not be necessary to restart Lbs in between tests. 
// However do this for now so the next test step does not fail
RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs

/////////////////////////////////////////////////////////////////////////


START_TESTCASE SFLBS-HybridMTLR-Futile-0002
//!@SYMTestCaseID SFLBS-HybridMTLR-Futile-0002
//! @SYMTestCaseDesc            Description missing
//! @SYMTestPriority            High
//! @SYMTestActions             See test step Sequence inline comments
//! @SYMTestExpectedResults     Sequence as per specified by FSM and UML Seq diagram is Followed
//! @SYMTestType                CIT
//! @SYMCreationDate            28/8/2008
//! @SYMAuthor                  alans
//! @SYMTestStatus              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini UEAssistedFutile
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsHybridMtlrFutile c:\testdata\configs\sf_lbs_mtlr.ini UEAssistedFutile
END_TESTCASE SFLBS-HybridMTLR-Futile-0002


/////////////////////////////////////////////////////////////////////////
// It should not be necessary to restart Lbs in between tests. 
// However do this for now so the next test step does not fail

RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs

/////////////////////////////////////////////////////////////////////////


START_TESTCASE SFLBS-HybridMTLR-Futile-0003
//!@SYMTestCaseID SFLBS-HybridMTLR-Futile-0003
//! @SYMTestCaseDesc            Description missing
//! @SYMTestPriority            High
//! @SYMTestActions             See test step Sequence inline comments
//! @SYMTestExpectedResults     Sequence as per specified by FSM and UML Seq diagram is Followed
//! @SYMTestType                CIT
//! @SYMCreationDate            28/8/2008
//! @SYMAuthor                  alans
//! @SYMTestStatus              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini NonHybridUEBasedFutile
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsHybridMtlrFutile c:\testdata\configs\sf_lbs_mtlr.ini NonHybridUEBasedFutile
END_TESTCASE SFLBS-HybridMTLR-Futile-0003


/////////////////////////////////////////////////////////////////////////

// It should not be necessary to restart Lbs in between tests. 
// However do this for now so the next test step does not fail

RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs

// For LBS-HybridMTLR-Futile-0004, need to use the admin cenrep with
// the special setting KLbsSpecialFeatureIntermediateFutileUpdate
// set to 'on'. Need to copy the file because it is read-only so
// can't set it through the admin API.
PREFIX RUN_UTILS
DeleteFile c:\private\10202be9\persists\1028224b.cre
CopyFile c:\testdata\configs\1028224b_interfutile_on.cre c:\private\10202be9\1028224b.cre
REMOVE_PREFIX

RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_ResetDefaultAdmin

// Select MTLR privacy controller.
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_SetPrivacyHandler c:\testdata\configs\sf_lbs_mtlr.ini PrivHandler

// Use hybrid protocol module
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_SetupProtocolStub
RUN_TEST_STEP 030 SfLbsHybridMTLRTestServer LbsStep_StartLbs

/////////////////////////////////////////////////////////////////////////


START_TESTCASE SFLBS-HybridMTLR-Futile-0004
//!@SYMTestCaseID SFLBS-HybridMTLR-Futile-0004
//! @SYMTestCaseDesc            Description missing
//! @SYMTestPriority            High
//! @SYMTestActions             See test step Sequence inline comments
//! @SYMTestExpectedResults     Sequence as per specified by FSM and UML Seq diagram is Followed
//! @SYMTestType                CIT
//! @SYMCreationDate            28/8/2008
//! @SYMAuthor                  alans
//! @SYMTestStatus              3. Released
RUN_TEST_STEP 010 SfLbsHybridMTLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_mtlr.ini HybridUEBasedLateFutile
RUN_TEST_STEP 120 SfLbsHybridMTLRTestServer LbsHybridMtlrFutile c:\testdata\configs\sf_lbs_mtlr.ini HybridUEBasedLateFutile
END_TESTCASE SFLBS-HybridMTLR-Futile-0004


RUN_TEST_STEP 020 SfLbsHybridMTLRTestServer LbsStep_StopLbs

RUN_UTILS DeleteFile c:\private\10282253\lbs\locmods\agpsintegmodule.ini

// Restore the original CenRep file - if there was one when we started
RUN_UTILS DeleteFile c:\private\10202be9\persists\1028224b.cre
RUN_UTILS DeleteFile c:\private\10202be9\1028224b.cre
