//
// Copyright (c) 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         btgpspsy_pnok.script
//! @SYMScriptTestEnvironment

LOAD_SUITE ctlbsbtgpspsytestserver

RUN_UTILS CopyFile c:\testdata\configs\lbstestconfig.txt c:\config.txt

START_TESTCASE                LBS-BTGPSPSY-PNOK-0001
//! @SYMTestCaseID              LBS-BTGPSPSY-PNOK-0001
//! @SYMTestCaseDesc            Test to ensure that the BT PSY is able to connect to and get a location request from a PNOK BT GPS device.  The PSY should recognise this as a PNOK device and change the device type in the list.
//! @SYMTestActions             1. Test should add a few BT GPS devices to the list.  The device on to the top of the list should be a PNOK BT device with the device type set to unknown.
//!                             2. Test makes a location request and should get a position returned back to it.
//!                             3. Test checks the list to ensure the valid GPS device is still at the top of the list and that the device type of this device has been changed to PNOK (3)
//! @SYMTestExpectedResults     Test should receive location update and should update the device list to indicate that the BT GPS device is a PNOK device.
//! @SYMTestType                CIT
//! @SYMCreationDate            10/12/2008
//! @SYMAuthor                  JosephSpracklen
//! @SYMTestStatus              3. Released
//! @SYMPREQ                    PREQ2116
RUN_TEST_STEP 100 ctlbsbtgpspsytestserver SetupBTGPSDeviceList c:\testdata\configs\setupdevicelist_pnok.ini Pnok01Pre
RUN_TEST_STEP 100 ctlbsbtgpspsytestserver BtGpsPsyLocationRequestStep c:\testdata\configs\btgpspsy_locationrequest.ini Pnok
RUN_TEST_STEP 100 ctlbsbtgpspsytestserver CheckBTGPSDeviceList c:\testdata\configs\setupdevicelist_pnok.ini Pnok01Post
RUN_TEST_STEP 100 ctlbsbtgpspsytestserver DeleteBTGPSDeviceList
END_TESTCASE                  LBS-BTGPSPSY-PNOK-0001



START_TESTCASE                LBS-BTGPSPSY-PNOK-0002
//! @SYMTestCaseID              LBS-BTGPSPSY-PNOK-0002
//! @SYMTestCaseDesc            Test to ensure the PSY is able to deal with a PNOK device entered into the device selection notifier.  The PSY should add this device to the list as a PNOK device.
//! @SYMTestActions             1. Test empties the BT Device List.
//!                             2. Test requests location, the BT PSY should load the BT Device Selection notifier and the test enters the valid PNOK device.
//!                             3. The PSY should be able to connect and receive a location update from the device and should return this to the test.
//!                             4. Test checks the device list to ensure the device type is changed to PNOK.
//! @SYMTestExpectedResults     Test should receive location update and should add the user entered device to the list as a PNOK device.
//! @SYMTestType                CIT
//! @SYMCreationDate            11/12/2008
//! @SYMAuthor                  JosephSpracklen
//! @SYMTestStatus              3. Released
//! @SYMPREQ                    PREQ2116
RUN_TEST_STEP 100 ctlbsbtgpspsytestserver SetupBTGPSDeviceList c:\testdata\configs\setupdevicelist_pnok.ini Pnok02Pre
RUN_TEST_STEP 100 ctlbsbtgpspsytestserver BtGpsPsyLocationRequestStep c:\testdata\configs\btgpspsy_locationrequest.ini Pnok
RUN_TEST_STEP 100 ctlbsbtgpspsytestserver CheckBTGPSDeviceList c:\testdata\configs\setupdevicelist_pnok.ini Pnok02Post
RUN_TEST_STEP 100 ctlbsbtgpspsytestserver DeleteBTGPSDeviceList
END_TESTCASE                  LBS-BTGPSPSY-PNOK-0002



START_TESTCASE                LBS-BTGPSPSY-PNOK-0003
//! @SYMTestCaseID              LBS-BTGPSPSY-PNOK-0003
//! @SYMTestCaseDesc            Test to ensure the PSY is able to send PNOK messages to the BT GPS device.  Test enables Night Mode, which the PSY should send to the GPS device as a PNOK message.
//! @SYMTestActions             1. Test adds a BT PNOK GPS device to the list.
//!                             2. Test requests location and enables the night mode.
//!                             3. The PSY should be able to connect and receive a location update from the device and should return this to the test.  It should also, change to night mode.
//!                             4. Test checks to ensure the device has changed to night mode.
//! @SYMTestExpectedResults     BT GPS device should receive the Night Mode setting from the test and turn to night mode.
//! @SYMTestType                CIT
//! @SYMCreationDate            5/1/2009
//! @SYMAuthor                  JosephSpracklen
//! @SYMTestStatus              3. Released
//! @SYMPREQ                    PREQ2116
RUN_TEST_STEP 100 ctlbsbtgpspsytestserver SetupBTGPSDeviceList c:\testdata\configs\setupdevicelist_pnok.ini Pnok01Pre
RUN_TEST_STEP 100 ctlbsbtgpspsytestserver BtGpsPsyPnokStep c:\testdata\configs\btgpspsy_locationrequest.ini Pnok01
RUN_TEST_STEP 100 ctlbsbtgpspsytestserver CheckBTGPSDeviceList c:\testdata\configs\setupdevicelist_pnok.ini Pnok01Post
RUN_TEST_STEP 100 ctlbsbtgpspsytestserver DeleteBTGPSDeviceList
END_TESTCASE                  LBS-BTGPSPSY-PNOK-0003



START_TESTCASE                LBS-BTGPSPSY-PNOK-0004
//! @SYMTestCaseID              LBS-BTGPSPSY-PNOK-0004
//! @SYMTestCaseDesc            Test to ensure the PSY is able to receive PNOK messages from the BT GPS device.  Test makes the device send up a PNOK message which the PSY should receive and update the property with the correct value.
//! @SYMTestActions             1. Test adds a BT PNOK GPS device to the list.
//!                             2. Test requests location.
//!                             3. Test makes the Simulated GPS device send a PNOK message (Battery Level)
//!                             4. Test checks that the PSY has received the PNOK message and has updated the Property with the correct value.
//! @SYMTestExpectedResults     PSY should receive the PNOK message from the device with the correct value.
//! @SYMTestType                CIT
//! @SYMCreationDate            5/1/2009
//! @SYMAuthor                  JosephSpracklen
//! @SYMTestStatus              3. Released
//! @SYMPREQ                    PREQ2116
RUN_TEST_STEP 100 ctlbsbtgpspsytestserver SetupBTGPSDeviceList c:\testdata\configs\setupdevicelist_pnok.ini Pnok01Pre
RUN_TEST_STEP 100 ctlbsbtgpspsytestserver BtGpsPsyPnokStep c:\testdata\configs\btgpspsy_locationrequest.ini Pnok02
RUN_TEST_STEP 100 ctlbsbtgpspsytestserver CheckBTGPSDeviceList c:\testdata\configs\setupdevicelist_pnok.ini Pnok01Post
RUN_TEST_STEP 100 ctlbsbtgpspsytestserver DeleteBTGPSDeviceList
END_TESTCASE                  LBS-BTGPSPSY-PNOK-0004

// Delete network registration status text file
RUN_UTILS DeleteFile c:\config.txt

