// 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:
// @File
// 
//

//! @SYMTestSuiteName         lbsprivfwparamctrl.script
//! @SYMScriptTestEnvironment

LOAD_SUITE LbsPrivFwTestServer -SharedData
PRINT Run LbsPrivFwTestServer

PREFIX RUN_UTILS
CopyFile c:\testdata\configs\lbstestconfig.txt c:\config.txt
DeleteFile c:\private\10202be9\persists\1028224b.cre
REMOVE_PREFIX

RUN_TEST_STEP 030 LbsPrivFwTestServer LbsStep_ResetDefaultAdmin
RUN_TEST_STEP 030 LbsPrivFwTestServer LbsStep_SetPrivacyHandler  c:\testdata\configs\lbsprivfw.ini CTRL-HANDLER
RUN_TEST_STEP 030 LbsPrivFwTestServer LbsStep_SetupStandalonePrivacyMode

RUN_TEST_STEP 030 LbsPrivFwTestServer LbsStep_InitializeTestChannel

START_TESTCASE                   LBS-PRIVFW-CTRL-PARAM-GSM-0001
//! @SYMTestCaseID               LBS-PRIVFW-CTRL-PARAM-GSM-0001
//! @SYMTestCaseDesc             Test for Privacy parameters (Identities) in Verification for GSM
//! @SYMPREQ                     PREQ1660
//! @SYMTestPriority             High
//! @SYMTestActions              1. Set Admin settings to use Privacy Controller.
//!                              2. Set different GSM Privacy Parameters. There are 6 GSM Privacy parameters
//!                              3. Issue a Network Privacy API VerifyLocationRequestL() for each Privacy Parameter
//!                              4. Verify the paramenters received at Privacy Controller client
//! @SYMTestExpectedResults      All Privacy parameters should match
//! @SYMTestType                 CIT
//! @SYMCreationDate             17/9/2007
//! @SYMAuthor                   brajendras
RUN_TEST_STEP 010 LbsPrivFwTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 030 LbsPrivFwTestServer KLbsPrivFwStep_Param  c:\testdata\configs\lbsprivfw.ini LBS-PRIVFW-PARAM-GSM-0001
END_TESTCASE                     LBS-PRIVFW-CTRL-PARAM-GSM-0001


START_TESTCASE                   LBS-PRIVFW-CTRL-PARAM-GSM-0002
//! @SYMTestCaseID               LBS-PRIVFW-CTRL-PARAM-GSM-0002
//! @SYMTestCaseDesc             Test for Privacy parameters (Identities) in Notification for GSM
//! @SYMPREQ                     PREQ1660
//! @SYMTestPriority             High
//! @SYMTestActions              1. Set Admin settings to use Privacy Controller.
//!                              2. Set different GSM Privacy Parameters. There are 6 GSM privacy paramenters
//!                              3. Issue a Network Privacy API NotifyLocationRequestL() for each privacy parameter
//!                              4. Verify the paramenters received at Privacy Controller client
//! @SYMTestExpectedResults      All Privacy parameters should match
//! @SYMTestType                 CIT
//! @SYMCreationDate             17/9/2007
//! @SYMAuthor                   brajendras
RUN_TEST_STEP 010 LbsPrivFwTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 030 LbsPrivFwTestServer KLbsPrivFwStep_Param  c:\testdata\configs\lbsprivfw.ini LBS-PRIVFW-PARAM-GSM-0002
END_TESTCASE                     LBS-PRIVFW-CTRL-PARAM-GSM-0002


START_TESTCASE                   LBS-PRIVFW-CTRL-PARAM-GSM-0003
//! @SYMTestCaseID               LBS-PRIVFW-CTRL-PARAM-GSM-0003
//! @SYMTestCaseDesc             Test for Invalid Privacy parameters (Identities) in Verification for GSM
//! @SYMPREQ                     PREQ1660
//! @SYMTestPriority             High
//! @SYMTestActions              1. Set Admin settings to use Privacy Controller.
//!                              2. Set GSP Privacy Parameters which is not supported.
//!                              3. Issue a Network Privacy API verification VerifyLocationRequestL()
//! @SYMTestExpectedResults      The LBS system should return proper error code to Client.
//! @SYMTestType                 CIT
//! @SYMCreationDate             17/9/2007
//! @SYMAuthor                   brajendras
RUN_TEST_STEP 010 LbsPrivFwTestServer LbsStep_InstallScheduler
RUN_TEST_STEP !PanicCode=0 030 LbsPrivFwTestServer KLbsPrivFwStep_Param  c:\testdata\configs\lbsprivfw.ini LBS-PRIVFW-PARAM-GSM-0003
END_TESTCASE                     LBS-PRIVFW-CTRL-PARAM-GSM-0003


START_TESTCASE                   LBS-PRIVFW-CTRL-PARAM-GSM-0004
//! @SYMTestCaseID               LBS-PRIVFW-CTRL-PARAM-GSM-0004
//! @SYMTestCaseDesc             Test for Invalid Privacy parameters (Identities) in Notification for GSM
//! @SYMPREQ                     PREQ1660
//! @SYMTestPriority             High
//! @SYMTestActions              1. Set Admin settings to use Privacy Controller.
//!                              2. Set GSP Privacy Parameters which is not supported.
//!                              3. Issue a Network Privacy API Notification request NotifyLocationRequestL()
//! @SYMTestExpectedResults      The LBS system should return proper error code to Client.
//! @SYMTestType                 CIT
//! @SYMCreationDate             17/9/2007
//! @SYMAuthor                   brajendras
RUN_TEST_STEP 010 LbsPrivFwTestServer LbsStep_InstallScheduler
RUN_TEST_STEP !PanicCode=0 030 LbsPrivFwTestServer KLbsPrivFwStep_Param  c:\testdata\configs\lbsprivfw.ini LBS-PRIVFW-PARAM-GSM-0004
END_TESTCASE                     LBS-PRIVFW-CTRL-PARAM-GSM-0004


START_TESTCASE                   LBS-PRIVFW-CTRL-PARAM-SUPL-0001
//! @SYMTestCaseID               LBS-PRIVFW-CTRL-PARAM-SUPL-0001
//! @SYMTestCaseDesc             Test for Privacy parameters (Identities) in Verification for SUPL
//! @SYMPREQ                     PREQ1660
//! @SYMTestPriority             High
//! @SYMTestActions              1. Set Admin settings to use Privacy Controller.
//!                              2. Set different SUPL Privacy Parameters. There are 8 SUPL Privacy parameters
//!                              3. Issue a Network Privacy API VerifyLocationRequestL() for each Privacy Parameter
//!                              4. Verify the paramenters received at Privacy Controller client
//! @SYMTestExpectedResults      All Privacy parameters should match
//! @SYMTestType                 CIT
//! @SYMCreationDate             17/9/2007
//! @SYMAuthor                   brajendras
RUN_TEST_STEP 010 LbsPrivFwTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 030 LbsPrivFwTestServer KLbsPrivFwStep_Param  c:\testdata\configs\lbsprivfw.ini LBS-PRIVFW-PARAM-SUPL-0001
END_TESTCASE                     LBS-PRIVFW-CTRL-PARAM-SUPL-0001


START_TESTCASE                   LBS-PRIVFW-CTRL-PARAM-SUPL-0002
//! @SYMTestCaseID               LBS-PRIVFW-CTRL-PARAM-SUPL-0002
//! @SYMTestCaseDesc             Test for Privacy parameters (Identities) in Notification for SUPL
//! @SYMPREQ                     PREQ1660
//! @SYMTestPriority             High
//! @SYMTestActions              1. Set Admin settings to use Privacy Controller.
//!                              2. Set different SUPL Privacy Parameters. There are 8 SUPL privacy paramenters
//!                              3. Issue a Network Privacy API Notification request NotifyLocationRequestL() for each privacy parameter
//!                              4. Verify the paramenters received at Privacy Controller client
//! @SYMTestExpectedResults      All Privacy parameters should match
//! @SYMTestType                 CIT
//! @SYMCreationDate             17/9/2007
//! @SYMAuthor                   brajendras
RUN_TEST_STEP 010 LbsPrivFwTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 030 LbsPrivFwTestServer KLbsPrivFwStep_Param  c:\testdata\configs\lbsprivfw.ini LBS-PRIVFW-PARAM-SUPL-0002
END_TESTCASE                     LBS-PRIVFW-CTRL-PARAM-SUPL-0002


START_TESTCASE                   LBS-PRIVFW-CTRL-PARAM-SUPL-0003
//! @SYMTestCaseID               LBS-PRIVFW-CTRL-PARAM-SUPL-0003
//! @SYMTestCaseDesc             Test for Invalid Privacy parameters (Identities) in Verification for SUPL
//! @SYMPREQ                     PREQ1660
//! @SYMTestPriority             High
//! @SYMTestActions              1. Set Admin settings to use Privacy Controller.
//!                              2. Set SUPL Privacy Parameters which is not supported.
//!                              3. Issue a Network Privacy API verification VerifyLocationRequestL()
//! @SYMTestExpectedResults      The LBS system should return proper error code to Client.
//! @SYMTestType                 CIT
//! @SYMCreationDate             17/9/2007
//! @SYMAuthor                   brajendras
RUN_TEST_STEP 010 LbsPrivFwTestServer LbsStep_InstallScheduler
RUN_TEST_STEP !PanicCode=4 030 LbsPrivFwTestServer KLbsPrivFwStep_Param  c:\testdata\configs\lbsprivfw.ini LBS-PRIVFW-PARAM-SUPL-0003
END_TESTCASE                     LBS-PRIVFW-CTRL-PARAM-SUPL-0003


START_TESTCASE                   LBS-PRIVFW-CTRL-PARAM-SUPL-0004
//! @SYMTestCaseID               LBS-PRIVFW-CTRL-PARAM-SUPL-0004
//! @SYMTestCaseDesc             Test for Invalid Privacy parameters (Identities) in Notification for SUPL
//! @SYMPREQ                     PREQ1660
//! @SYMTestPriority             High
//! @SYMTestActions              1. Set Admin settings to use Privacy Controller.
//!                              2. Set SUPL Privacy Parameters which is not supported.
//!                              3. Issue a Network Privacy API Notification request NotifyLocationRequestL()
//! @SYMTestExpectedResults      The LBS system should return proper error code to Client.
//! @SYMTestType                 CIT
//! @SYMCreationDate             17/9/2007
//! @SYMAuthor                   brajendras
RUN_TEST_STEP 010 LbsPrivFwTestServer LbsStep_InstallScheduler
RUN_TEST_STEP !PanicCode=4 030 LbsPrivFwTestServer KLbsPrivFwStep_Param  c:\testdata\configs\lbsprivfw.ini LBS-PRIVFW-PARAM-SUPL-0004
END_TESTCASE                     LBS-PRIVFW-CTRL-PARAM-SUPL-0004




START_TESTCASE                   LBS-PRIVFW-CTRL-PARAM-0001
//! @SYMTestCaseID               LBS-PRIVFW-CTRL-PARAM-0001
//! @SYMTestCaseDesc             Privacy Verification Requests using request info type TLbsExternalRequestInfo and
//!                              ensuring that all data items are exercised
//! @SYMREQ                      REQ8011, REQ8012, REQ8013
//! @SYMPREQ                     PREQ1660
//! @SYMTestPriority             High
//! @SYMTestActions              1. Set EExternalLocationON in admin settings
//!                              2. Set Admin settings to use privacy controller
//!                              3. Create multiple request info records ensuring that all the separate data items are used and
//!                              the buffers used are greater than the buffers expected for the original TlbsExternalRequestInfo type
//!                              5. Issue multiple Network Privacy API VerifyLocationRequestL() using each of the info records
//!                              6. The controller should record and respond to each verification request
//! @SYMTestExpectedResults      1. The appropriate 'accept/reject' respond should be returned to the network
//!                              2. The request info data received at the controller should match a truncated version of that sent from the network
//! @SYMTestType                 CIT
//! @SYMCreationDate             17/9/2007
//! @SYMAuthor                   peterturner
RUN_TEST_STEP 010 LbsPrivFwTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 030 LbsPrivFwTestServer KLbsPrivFwStep_Param  c:\testdata\configs\lbsprivfw.ini  LBS-PRIVFW-PARAM-0001
END_TESTCASE                     LBS-PRIVFW-CTRL-PARAM-0001


START_TESTCASE                   LBS-PRIVFW-CTRL-PARAM-0002
//! @SYMTestCaseID               LBS-PRIVFW-CTRL-PARAM-0002
//! @SYMTestCaseDesc             Privacy Notification Requests using request info type TLbsExternalRequestInfo and
//!                              ensuring that all data items are exercised
//! @SYMREQ                      REQ8011, REQ8012, REQ8013
//! @SYMPREQ                     PREQ1660
//! @SYMTestPriority             High
//! @SYMTestActions              1. Set EExternalLocationON in admin settings
//!                              2. Set Admin settings to use privacy controller
//!                              3. Create multiple request info records ensuring that all the separate data items are used and
//!                              the buffers used are greater than the buffers expected for the original TlbsExternalRequestInfo type
//!                              5. Issue multiple Network Privacy API NotifyLocationRequestL() using each of the info records
//!                              6. The controller should record each verification request
//! @SYMTestExpectedResults      1. The request info data received at the controller should match a truncated version of that sent from the network
//! @SYMTestType                 CIT
//! @SYMCreationDate             17/9/2007
//! @SYMAuthor                   peterturner
RUN_TEST_STEP 010 LbsPrivFwTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 030 LbsPrivFwTestServer KLbsPrivFwStep_Param  c:\testdata\configs\lbsprivfw.ini  LBS-PRIVFW-PARAM-0002
END_TESTCASE                     LBS-PRIVFW-CTRL-PARAM-0002


START_TESTCASE                  LBS-PRIVFW-CTRL-PARAM-REQTYPE-0001
//!@SYMTestCaseID		LBS-PRIVFW-CTRL-PARAM-REQTYPE-0001
//!@SYMTestCaseDesc		Test for different Request Type parameters in Verification request
//!
//!@SYMTestActions		1. Set Admin settings to use Privacy Controller.
//!				2. Do not set RequestType.	 
//!				3. Issue a Network Privacy API Verification request VerifyLocationRequestL()
//!				4. Check the RequestType value transferred to Controller.
//!
//!				5. Set RequestType to ERequestSingleShot.	 
//!				6. Issue a Network Privacy API Verification request VerifyLocationRequestL()
//!				7. Check the RequestType value transferred to Controller.
//!
//!				8. Set RequestType to ERequestPeriodic.	 
//!				9. Issue a Network Privacy API Verification request VerifyLocationRequestL()
//!				10. Check the RequestType value transferred to Controller.
//!
//!				11. Set RequestType to ERequestAreaEvent.	 
//!				12. Issue a Network Privacy API Verification request VerifyLocationRequestL()
//!				13. Check the RequestType value transferred to Controller.
//!
//!@SYMTestExpectedResults	ERequestTypeUnknown, ERequestSingleShot, ERequestPeriodic, ERequestAreaEvent should 
//!				be transferred to Controller in the order.
//!@SYMPREQ			PREQ 1660
//!
//!@SYMTestPriority		2
//!@SYMTestStatus		Not Implemented
RUN_TEST_STEP 010 LbsPrivFwTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 030 LbsPrivFwTestServer KLbsPrivFwStep_Param  c:\testdata\configs\lbsprivfw.ini  LBS-PRIVFW-PARAM-0003
END_TESTCASE                   LBS-PRIVFW-CTRL-PARAM-REQTYPE-0001

START_TESTCASE                  LBS-PRIVFW-CTRL-PARAM-REQTYPE-0002
//!@SYMTestCaseID		LBS-PRIVFW-CTRL-PARAM-REQTYPE-0002
//!@SYMTestCaseDesc		Test for different Request Type parameters in Notificcation request
//!
//!@SYMTestActions		1. Set Admin settings to use Privacy Controller.
//!				2. Do not set RequestType.	 
//!				3. Issue a Network Privacy API Verification request NotifyLocationRequestL()
//!				4. Check the RequestType value transferred to Controller.
//!
//!				5. Set RequestType to ERequestSingleShot.	 
//!				6. Issue a Network Privacy API Verification request NotifyLocationRequestL()
//!				7. Check the RequestType value transferred to Controller.
//!
//!				8. Set RequestType to ERequestPeriodic.	 
//!				9. Issue a Network Privacy API Verification request NotifyLocationRequestL()
//!				10. Check the RequestType value transferred to Controller.
//!
//!				11. Set RequestType to ERequestAreaEvent.	 
//!				12. Issue a Network Privacy API Verification request NotifyLocationRequestL()
//!				13. Check the RequestType value transferred to Controller.
//!
//!@SYMTestExpectedResults	ERequestTypeUnknown, ERequestSingleShot, ERequestPeriodic, ERequestAreaEvent should 
//!				be transferred to Controller in the order.
//!@SYMPREQ			PREQ 1660
//!
//!@SYMTestPriority		2
//!@SYMTestStatus		Not Implemented
RUN_TEST_STEP 010 LbsPrivFwTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 030 LbsPrivFwTestServer KLbsPrivFwStep_Param  c:\testdata\configs\lbsprivfw.ini  LBS-PRIVFW-PARAM-0004
END_TESTCASE                   LBS-PRIVFW-CTRL-PARAM-REQTYPE-0002

START_TESTCASE                  LBS-PRIVFW-CTRL-PARAM-REQTYPE-0003
//!@SYMTestCaseID		LBS-PRIVFW-CTRL-PARAM-REQTYPE-0003
//!@SYMTestCaseDesc		Test for different Request Type parameters in NotifyVerificationTimeout request
//!                             This test makes use of the fact that LBS will process a NotifyVerificationTimeoutL() request
//!                             without first receiving a verification request as long as the request Id is valid 
//!@SYMTestActions		1. Set Admin settings to use Privacy Controller.
//!				2. Do not set RequestType.	 
//!				3. Issue a Network Privacy API verification timeout request NotifyVerificationTimeoutL()
//!				4. Check the RequestType value transferred to Controller.
//!
//!				5. Set RequestType to ERequestSingleShot.	 
//!				6. Issue a Network Privacy API verification timeout request NotifyVerificationTimeoutL()
//!				7. Check the RequestType value transferred to Controller.
//!
//!				8. Set RequestType to ERequestPeriodic.	 
//!				9. Issue a Network Privacy API verification timeout request NotifyVerificationTimeoutL()
//!				10. Check the RequestType value transferred to Controller.
//!
//!				11. Set RequestType to ERequestAreaEvent.	 
//!				12. Issue a Network Privacy API verification timeout request NotifyVerificationTimeoutL()
//!				13. Check the RequestType value transferred to Controller.
//!
//!@SYMTestExpectedResults	ERequestTypeUnknown, ERequestSingleShot, ERequestPeriodic, ERequestAreaEvent should 
//!				be transferred to Controller in the order.
//!@SYMPREQ			PREQ 1660
//!
//!@SYMTestPriority		2
//!@SYMTestStatus		Implemented
RUN_TEST_STEP 010 LbsPrivFwTestServer LbsStep_InstallScheduler
RUN_TEST_STEP 030 LbsPrivFwTestServer KLbsPrivFwStep_Param  c:\testdata\configs\lbsprivfw.ini  LBS-PRIVFW-PARAM-0005
END_TESTCASE                   LBS-PRIVFW-CTRL-PARAM-REQTYPE-0003


START_TESTCASE                  LBS-PRIVFW-CTRL-PARAM-REQTYPE-0004
//!@SYMTestCaseID		LBS-PRIVFW-CTRL-PARAM-REQTYPE-0004
//!@SYMTestCaseDesc		Test for an illegal Request Type parameter
//!                             This test attempts to make a request but it is rejected due to the illegal Request Type
//!@SYMTestPriority             High
//!@SYMTestActions              1. Set Admin settings to use Privacy Controller
//!                             2. Set RequestType to an illegal value (ERequestAreaEvent + 2)
//!                             3. Issue a Network Privacy API Verification request VerifyLocationRequestL()
//!                             4. Check that the illegal Request Type caused the client to panic.
//!@SYMTestExpectedResults      The client to panics
//!@SYMTESTSTATUS               Implemented
//!@SYMPREQ			PREQ 1660
//!@SYMTestPriority		2
RUN_TEST_STEP 010 LbsPrivFwTestServer LbsStep_InstallScheduler
RUN_TEST_STEP !PanicCode=5 030 LbsPrivFwTestServer KLbsPrivFwStep_Param  c:\testdata\configs\lbsprivfw.ini  LBS-PRIVFW-PARAM-0006
END_TESTCASE                   LBS-PRIVFW-CTRL-PARAM-REQTYPE-0004

RUN_TEST_STEP 030 LbsPrivFwTestServer LbsStep_CloseTestChannel
