//! @File
//! @SYMTestSuiteName	SF-LBS-HYBRIDMOLR-UEASSISTED-GPSOK
//! @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 SfLbsHybridMOLRTestServer -SharedData

PRINT Run SfLbsHybridMOLRTestServer


// Before we start LBS, select the test A-GPS integration module to use.
// Make sure the default profile is used, rather than one from the c drive
PREFIX RUN_UTILS
DeleteFile c:\private\10282253\lbs\lbsprofile.ini
MkDir c:\private\10282253\
MkDir c:\private\10282253\lbs\
MkDir c:\private\10282253\lbs\locmods\
//	CopyFile c:\testdata\configs\xtestmodule.ini c:\private\10282253\lbs\locmods\agpsintegmodule.ini
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 SfLbsHybridMOLRTestServer LbsStep_ResetDefaultAdmin

// Use hybrid protocol module
RUN_TEST_STEP 010 SfLbsHybridMOLRTestServer LbsStep_SetupProtocolStub

// Use hybrid protocol module
RUN_TEST_STEP 010 SfLbsHybridMOLRTestServer LbsStep_SetupRoamSelfLocate

RUN_TEST_STEP 030 SfLbsHybridMOLRTestServer LbsStep_StartLbs



START_TESTCASE                SFLBS-HybridMOLR-UEAssistedMOLR-GpsOk-0001
//! @SYMTestCaseID              SFLBS-HybridMOLR-UEAssistedMOLR-GpsOk-0001
//! @SYMTestCaseDesc            Client generates MOLR request
//!                             GPS Module generates an accurate position in UE Assisted State
//!                             Note: The position generated by the GPS Module is of greater accuracy than the Ref Position
//!                             See: lbshybridmolr/documentation/MOLR.htm#Hybrid_LBS_UE-Assisted_MO-LR_Accurate
//! @SYMTestPriority            Critical
//! @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 SfLbsHybridMOLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 020 SfLbsHybridMOLRTestServer LbsStep_SetUpPsy c:\testdata\configs\sf_lbs_molr.ini LBS-MOLR
// Configure Hybrid AGps module options
RUN_TEST_STEP 120 SfLbsHybridMOLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_molr.ini UEAssistedMOLRGpsOk
RUN_TEST_STEP 120 SfLbsHybridMOLRTestServer LbsHybridUEAssistedMOLRGPSOk
END_TESTCASE                  SFLBS-HybridMOLR-UEAssistedMOLR-GpsOk-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 SfLbsHybridMOLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMOLRTestServer LbsStep_StartLbs


START_TESTCASE                SFLBS-HybridMOLR-UEAssistedMOLR-GpsOk-0002
//! @SYMTestCaseID              SFLBS-HybridMOLR-UEAssistedMOLR-GpsOk-0002
//! @SYMTestCaseDesc            Client generates MOLR request
//!                             GPS Module generates an accurate position in UE Assisted State
//!                             Note: The position generated by the GPS Module is of greater accuracy than the Ref Position
//!                             See: lbshybridmolr/documentation/MOLR.htm#Hybrid_LBS_UE-Assisted_MO-LR_Accurate
//! @SYMTestPriority            Critical
//! @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 SfLbsHybridMOLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 020 SfLbsHybridMOLRTestServer LbsStep_SetUpPsy c:\testdata\configs\sf_lbs_molr.ini LBS-MOLR
// Configure Hybrid AGps module options
RUN_TEST_STEP 120 SfLbsHybridMOLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_molr.ini INC103714
RUN_TEST_STEP 120 SfLbsHybridMOLRTestServer LbsHybridUEAssistedMOLRGPSOk
END_TESTCASE                  SFLBS-HybridMOLR-UEAssistedMOLR-GpsOk-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 SfLbsHybridMOLRTestServer LbsStep_StopLbs
RUN_TEST_STEP 030 SfLbsHybridMOLRTestServer LbsStep_StartLbs


START_TESTCASE                SFLBS-HybridMOLR-UEAssistedMOLR-GpsOk-0003
//! @SYMTestCaseID              SFLBS-HybridMOLR-UEAssistedMOLR-GpsOk-0003
//! @SYMTestCaseDesc            Client generates a self locate MOLR request and
//!                             then cancels it. A single cancel should be sent out to the protocol module.
//!                             This test checks that one and  only one cancel arrives at the prtocol module.
//!                             If the cancel on the request bus to the AGPS manager is overwritten
//!                             by a status message then the test will fail. Thus this test
//!                             validates code in the locations server that prevents the cancel
//!                             being overwritten. It also validates code in the agps manager
//!                             that prevents a second cancel being sent to the protocol module
//!                             when it shouldn't after the loc server has sent two cancels back to back
//!                             INC121701: [v9.4] No Cancel to AGPSmodule at the bottom of the sequence of Hybrid Self-Locate
//! @SYMTestPriority            Critical
//! @SYMTestActions             See test step Sequence inline comments
//! @SYMTestExpectedResults     A cancel sent to protocol module
//! @SYMTestType                CIT
//! @SYMCreationDate            28/8/2008
//! @SYMAuthor                  alans
//! @SYMTestStatus              3. Released
RUN_TEST_STEP 010 SfLbsHybridMOLRTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 020 SfLbsHybridMOLRTestServer LbsStep_SetUpPsy c:\testdata\configs\sf_lbs_molr.ini LBS-MOLR
// Configure Hybrid AGps module options
RUN_TEST_STEP 120 SfLbsHybridMOLRTestServer LbsStep_ConfigHybridModule c:\testdata\configs\sf_lbs_molr.ini UEAssistedMOLRCancel
RUN_TEST_STEP 120 SfLbsHybridMOLRTestServer LbsHybridUEAssistedMOLRGPSOk c:\testdata\configs\sf_lbs_molr.ini UEAssistedMOLRCancel
END_TESTCASE                  SFLBS-HybridMOLR-UEAssistedMOLR-GpsOk-0003
RUN_TEST_STEP 020 SfLbsHybridMOLRTestServer LbsStep_StopLbs
RUN_UTILS DeleteFile c:\private\10282253\lbs\locmods\agpsintegmodule.ini


