sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/scripts/ssrefpluginstest_custcmd_publishstartupmode.script
// 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:
//
PRINT Run CCustomCmdTestPublishStartupMode tests
LOAD_SUITE tunitcustcmd_server
START_TESTCASE DEVSRVS-SSREFPLUGINS-CUSTCMD-0022
//! @SYMTestCaseID DEVSRVS-SSREFPLUGINS-CUSTCMD-0022
//! @SYMTestType UT
//! @SYMTestPriority High
//! @SYMTestStatus Implemented
//! @SYMTestCaseDesc Tests the behaviour of CCustomCmdPublishStartupMode with all the required capabilities (PowerMgmt,ProtServ & WriteDeviceData).
//! Tests the cancel behaviour of CCustomCmdPublishStartupMode.
//! @SYMTestActions doTestCreateExecuteAndDestroyL() The test performs operations on a CCustomCmdPublishStartupMode object, namely calling the following methods:
//! 1. NewL - Creating the object
//! 2. Initialize - Initialising the custom cmd
//! 3. Execute - Executing the custom cmd
//! 4. Close - Closes the custom command
//! doTestFactoryCreateAndExecuteCancelL() The test performs operations on a CCustomCmdPublishStartupMode object, namely calling the following methods:
//! 1. SsmCustomCmdFactory::CmdPublishStartupModeNewL - Creating the object
//! 2. Initialize - Initialising the custom cmd
//! 3. Execute - Executing the custom cmd
//! 4. ExecuteCancel - Cancels the custom command
//! 5. Close - Closes the custom command
//! @SYMTestExpectedResults Command should execute normally and should complete with KErrNone.
RUN_TEST_STEP 100 tunitcustcmd_server TestPublishStartupModeWithCap
END_TESTCASE DEVSRVS-SSREFPLUGINS-CUSTCMD-0022
RUN_PROGRAM 50 setcap.exe tunitcustcmd_server.exe 000024 tunitcustcmd_server_WithoutCap1.exe
LOAD_SUITE tunitcustcmd_server_WithoutCap1
START_TESTCASE DEVSRVS-SSREFPLUGINS-CUSTCMD-0032
//! @SYMTestCaseID DEVSRVS-SSREFPLUGINS-CUSTCMD-0032
//! @TaskID bh1sosd4#32
//! @SYMTestType UT
//! @SYMTestPriority High
//! @SYMTestStatus Implemented
//! @SYMTestCaseDesc Tests whether setting the Central Repository key 101f8762 fails without proper write capabilities (without ProtServ capability)
//! @SYMTestActions doTestStepPreambleL() The test performs operations on a CRepository object, namely calling the following methods:
//! 1. NewL - Creating the object
//! 2. Set - Setting the Central Repository key
//! @SYMTestExpectedResults Setting the Central Repository key 101f8762 should fail & complete with KErrPermissionDenied.
RUN_TEST_STEP 100 tunitcustcmd_server_WithoutCap1 TestPublishStartupModeWithoutCap
END_TESTCASE DEVSRVS-SSREFPLUGINS-CUSTCMD-0032
RUN_PROGRAM 50 setcap.exe tunitcustcmd_server.exe 000120 tunitcustcmd_server_WithoutCap2.exe
LOAD_SUITE tunitcustcmd_server_WithoutCap2
START_TESTCASE DEVSRVS-SSREFPLUGINS-CUSTCMD-0033
//! @SYMTestCaseID DEVSRVS-SSREFPLUGINS-CUSTCMD-0033
//! @TaskID bh1sosd4#32
//! @SYMTestType UT
//! @SYMTestPriority High
//! @SYMTestStatus Implemented
//! @SYMTestCaseDesc Tests whether setting the Central repository key 101f8762 fails without write capabilities (without PowerMgmt capability)
//! @SYMTestActions doTestStepPreambleL() The test performs operations on a CRepository object, namely calling the following methods:
//! 1. NewL - Creating the object
//! 2. Set - Setting the Central Repository key
//! @SYMTestExpectedResults Setting the Central Repository key 101f8762 should fail & complete with KErrPermissionDenied.
RUN_TEST_STEP 100 tunitcustcmd_server_WithoutCap2 TestPublishStartupModeWithoutCap
END_TESTCASE DEVSRVS-SSREFPLUGINS-CUSTCMD-0033
RUN_PROGRAM 50 setcap.exe tunitcustcmd_server.exe 000104 tunitcustcmd_server_WithoutCap3.exe
LOAD_SUITE tunitcustcmd_server_WithoutCap3
START_TESTCASE DEVSRVS-SSREFPLUGINS-CUSTCMD-0034
//! @SYMTestCaseID DEVSRVS-SSREFPLUGINS-CUSTCMD-0034
//! @TaskID bh1sosd4#32
//! @SYMTestType UT
//! @SYMTestPriority High
//! @SYMTestStatus Implemented
//! @SYMTestCaseDesc Tests whether setting the Central repository key 101f8762 fails without write capabilities (without WriteDeviceData capability)
//! @SYMTestActions doTestStepPreambleL() The test performs operations on a CRepository object, namely calling the following methods:
//! 1. NewL - Creating the object
//! 2. Set - Setting the Central Repository key
//! @SYMTestExpectedResults Setting the Central Repository key 101f8762 should fail & complete with KErrPermissionDenied.
RUN_TEST_STEP 100 tunitcustcmd_server_WithoutCap3 TestPublishStartupModeWithoutCap
END_TESTCASE DEVSRVS-SSREFPLUGINS-CUSTCMD-0034