First public contribution.
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #include "tups_utils.h"
21 CCloseUpsStep::CCloseUpsStep()
24 * The use of this test step is to shutdown the ups server form a test script using tupsinteg_x
25 * test step, this action will cause the closure of the decisions database used by UPS server, an
26 * in consecuence allows the deletion of the DB file.
28 * Note: This test step will be only effective if there is not any server connected to ups server.
29 * This test step does not delete the decision DB.
32 SetTestStepName(KCloseUps);
35 CCloseUpsStep::~CCloseUpsStep()
43 TVerdict CCloseUpsStep::doTestStepPreambleL()
45 * @return - TVerdict code
49 SetTestStepResult(EPass);
50 return TestStepResult();
53 TVerdict CCloseUpsStep::doTestStepL()
55 * @return - TVerdict code
58 UserPromptService::RUpsSession sTestSession;
62 // Connects to UPS server.
63 err = sTestSession.Connect();
67 // Requests UPS server shut down
68 err = sTestSession.ShutdownServer();
74 INFO_PRINTF1(_L("UtilsCloseUps: UPS Server successfully shut down"));
78 ERR_PRINTF2(_L("UtilsCloseUps: Failure to shut down UPS Server: %d"),err);
84 ERR_PRINTF2(_L("UtilsCloseUps: Failure to Connect to UPS Server: %d"),err);
88 return TestStepResult();
91 TVerdict CCloseUpsStep::doTestStepPostambleL()
93 * @return - TVerdict code
96 return TestStepResult();