devicesrvapitest/hwrmhaitest/hwrm/scripts/telephony-hwrm-validation-manual_powerstate.script
//
// Copyright (c) 2005-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 telephony-hwrm-validation-manual_powerstate
//! @SYMScriptTestEnvironment This test script requires a basic ROM.
//
// Tests all public elements of the CProperty
// classes as a means of confidence that the APIs work as expected.
//
// The purpose is to provide a regression test suite of PublishedAll
// APIs for: CProperty
// The most tests are automated, but charging status should be changed manually.
//
LOAD_SUITE T_HWRM
START_TESTCASE TELEPHONY-HWRM-VALIDATION-MANUAL_POWERSTATE-0001
//!@SYMTestCaseID TELEPHONY-HWRM-VALIDATION-MANUAL_POWERSTATE-0001
//!@SYMAPI
//! RProperty::Get(TUid, TUint, Tint{ref});
//!@SYMAuthor aramirez
//!@SYMCreationDate 8/9/2008
//!@SYMTestCaseDesc Read battery level
//!@SYMTestActions
//! 1. Instantiate a RProperty: NewL
//! 2. Get battery level (category = KPSUidHWRMPowerState;key = KHWRMBatteryLevel)
//! 3. Destroy a RProperty object: ~
//!@SYMTestStatus Verified
//!@SYMTestPriority high
//!@SYMTestExpectedResults
//! Battery level with no errors
//!@SYMTestType CIT
START_TEST_BLOCK 60 T_HWRM \telephony\hwrm\telephony-hwrm-validation-manual_powerstate.ini
CREATE_OBJECT RProperty property1
COMMAND property1 NewL
COMMAND property1 Get TELEPHONY-HWRM-PowerState-0001-0001-Get_command02
COMMAND property1 ~
END_TEST_BLOCK
END_TESTCASE TELEPHONY-HWRM-VALIDATION-MANUAL_POWERSTATE-0001
START_TESTCASE TELEPHONY-HWRM-VALIDATION-MANUAL_POWERSTATE-0002
//!@SYMTestCaseID TELEPHONY-HWRM-VALIDATION-MANUAL_POWERSTATE-0002
//!@SYMAPI
//! RProperty::Get(TUid, TUint, Tint{ref});
//!@SYMAuthor aramirez
//!@SYMCreationDate 8/9/2008
//!@SYMTestCaseDesc Read battery status
//!@SYMTestActions
//! 1. Instantiate a RProperty: NewL
//! 2. Get battery status (category = KPSUidHWRMPowerState;key = KHWRMBatteryStatus)
//! 3. Destroy a RProperty object: ~
//!@SYMTestStatus Verified
//!@SYMTestPriority high
//!@SYMTestExpectedResults
//! Battery status with no errors
//!@SYMTestType CIT
START_TEST_BLOCK 60 T_HWRM \telephony\hwrm\telephony-hwrm-validation-manual_powerstate.ini
CREATE_OBJECT RProperty property1
COMMAND property1 NewL
COMMAND property1 Get TELEPHONY-HWRM-PowerState-0002-0001-Get_command02
COMMAND property1 ~
END_TEST_BLOCK
END_TESTCASE TELEPHONY-HWRM-VALIDATION-MANUAL_POWERSTATE-0002
START_TESTCASE TELEPHONY-HWRM-VALIDATION-MANUAL_POWERSTATE-0003
//!@SYMTestCaseID TELEPHONY-HWRM-VALIDATION-MANUAL_POWERSTATE-0003
//!@SYMAPI
//! RProperty::Get(TUid, TUint, Tint{ref});
//!@SYMAuthor aramirez
//!@SYMCreationDate 8/9/2008
//!@SYMTestCaseDesc Read charging status
//!@SYMTestActions
//! 1. Instantiate a RProperty: NewL
//! 2. Get charging status (category = KPSUidHWRMPowerState;key = KHWRMChargingStatus)
//! 3. Destroy a RProperty object: ~
//!@SYMTestStatus Verified
//!@SYMTestPriority high
//!@SYMTestExpectedResults
//! Charging status with no errors
//!@SYMTestType CIT
START_TEST_BLOCK 60 T_HWRM \telephony\hwrm\telephony-hwrm-validation-manual_powerstate.ini
CREATE_OBJECT RProperty property1
COMMAND property1 NewL
COMMAND property1 Get TELEPHONY-HWRM-PowerState-0003-0001-Get_command02
COMMAND property1 ~
END_TEST_BLOCK
END_TESTCASE TELEPHONY-HWRM-VALIDATION-MANUAL_POWERSTATE-0003
START_TESTCASE TELEPHONY-HWRM-VALIDATION-MANUAL_POWERSTATE-0004
//!@SYMTestCaseID TELEPHONY-HWRM-VALIDATION-MANUAL_POWERSTATE-0004
//!@SYMAPI
//! RProperty::Get(TUid, TUint, Tint{ref});
//! RProperty::Attach(TUid, TUint, TOwnerType);
//! RProperty::Subscribe(TRequestStatus{ref});
//!@SYMAuthor aramirez
//!@SYMCreationDate 8/9/2008
//!@SYMTestCaseDesc Verify charging status change when charging begins
//!@SYMTestActions
//! 1. Instantiate a RProperty: NewL
//! 2. Get charging status (category = KPSUidHWRMPowerState;key = KHWRMChargingStatus)
//! 3. Attach charging status (category = KPSUidHWRMPowerState;key = KHWRMChargingStatus)
//! 4. Subscribe to a charging status
//! 5 . Get charging status (category = KPSUidHWRMPowerState;key = KHWRMChargingStatus)
//! 6. Destroy a RProperty object: ~
//!@SYMTestStatus Verified
//!@SYMTestPriority high
//!@SYMTestExpectedResults
//! Charging status change when charging begins with no errors
//!@SYMTestType CIT
START_TEST_BLOCK 300 T_HWRM \telephony\hwrm\telephony-hwrm-validation-manual_powerstate.ini
CREATE_OBJECT RProperty property1
COMMAND property1 NewL
COMMAND property1 Get TELEPHONY-HWRM-PowerState-0004-0001-Get_command02
COMMAND property1 Attach TELEPHONY-HWRM-PowerState-0004-0001-Attach_command03
COMMAND property1 Subscribe
OUTSTANDING
COMMAND property1 Get TELEPHONY-HWRM-PowerState-0004-0001-Get_command05
COMMAND property1 ~
END_TEST_BLOCK
END_TESTCASE TELEPHONY-HWRM-VALIDATION-MANUAL_POWERSTATE-0004
DELAY 10000