// 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: Test script to test multiple MTLR's running over one PM with
//  a MOLR, X3P and a NI-MTLR request also running
//

//! @File
//! @SYMTestSuiteName         multiple_mtlr_molr_x3p_nimtlr_onepm.script
//! @SYMScriptTestEnvironment

LOAD_SUITE LbsHybridMultipleTestServer -SharedData
PRINT Run LbsHybridMultipleTestServer

// 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\ctagpsnpetestmoduledatasource.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 LbsHybridMultipleTestServer LbsStep_ResetDefaultAdmin

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

// Use hybrid protocol module
RUN_TEST_STEP 010 LbsHybridMultipleTestServer LbsStep_SetupMultipleProtocolStubs c:\testdata\configs\lbs_multiple_subsessions.ini ProtocolModule1

// Use hybrid protocol module
RUN_TEST_STEP 010 LbsHybridMultipleTestServer LbsStep_SetupRoamSelfLocate

// Start LBS
RUN_TEST_STEP 030 LbsHybridMultipleTestServer LbsStep_StartLbs


START_TESTCASE                LBS-MultipleMTLRs-MOLR-X3P-NIMTLR-OnePm-0001
//! @SYMTestCaseID              LBS-MultipleMTLRs-MOLR-X3P-NIMTLR-OnePm-0001
//! @SYMTestCaseDesc            Tests running two MTLR's concurrently over one Protocol Module whilst also running a MOLR request, a X3P request and a NI MTLR emergency request.  All sessions should be able to complete and receive a valid location update at the end.
//! @SYMTestPriority            Critical
//! @SYMTestActions             1. Test setups LBS with one PM
//!                             2. Test starts off X3P request
//!                             3. After the X3P request has been started, the test then starts the remaining sessions (MOLR, MTLR's and NI-MTLR)
//!                             4. Run the sequences for all the different sessions
//!                             5. Wait for all sequences to finish ensuring they all get the accurate GPS position
//! @SYMTestExpectedResults     Both active sessions should run getting an accurate position.
//! @SYMTestType                CIT
//! @SYMCreationDate            18/5/2009
//! @SYMAuthor                  JosephSpracklen
//! @SYMTestStatus              3. Released
RUN_TEST_STEP 010 LbsHybridMultipleTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 020 LbsHybridMultipleTestServer LbsStep_SetUpPsy c:\testdata\configs\lbs_multiple_subsessions.ini LBS-MOLR
RUN_TEST_STEP 120 LbsHybridMultipleTestServer LbsStep_ConfigHybridModule c:\testdata\configs\lbs_multiple_subsessions.ini MultipleSubsessionsOK
RUN_TEST_STEP 120 LbsHybridMultipleTestServer LbsHybridMultipleTest c:\testdata\configs\multiple_subsessions_onepm.ini TwoMtlrsOneMolrOneX3POneNIMtlrOnePm
END_TESTCASE                  LBS-MultipleMTLRs-MOLR-X3P-NIMTLR-OnePm-0001

// Stop LBS
RUN_TEST_STEP 020 LbsHybridMultipleTestServer LbsStep_StopLbs

