diff -r 39bb7c3571e9 -r 052078dda061 networkcontrol/ipupsplugins/test/te_ipups/src/te_ipups_delete_decision_db.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/networkcontrol/ipupsplugins/test/te_ipups/src/te_ipups_delete_decision_db.cpp Tue Jun 29 19:20:22 2010 +0530 @@ -0,0 +1,82 @@ +// Copyright (c) 2008-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 + @test + @internalComponent - Internal Symbian test code +*/ + +#include "te_ipups_stepbase.h" +#include "te_ipups_delete_decision_db.h" + +CIpUpsDeleteDecisionDB::CIpUpsDeleteDecisionDB() +/** + * Constructor + */ + { + SetTestStepName(KIpUpsDeleteDecisionDB); + } + +CIpUpsDeleteDecisionDB::~CIpUpsDeleteDecisionDB() +/** + * Destructor + */ + { + } + +TVerdict CIpUpsDeleteDecisionDB::doTestStepPreambleL() +/** + * @return - TVerdict code + */ + { + SetTestStepResult(EPass); + return TestStepResult(); + } + +TVerdict CIpUpsDeleteDecisionDB::doTestStepL() +/** + * @return - TVerdict code + */ + { + UserPromptService::RUpsManagement upsManagement; + + //Connect to the UPS Manager + User::LeaveIfError(upsManagement.Connect()); + + //Delete the contents of the Decision Database + TRAPD(err, upsManagement.DeleteDatabaseL()); + + if (err != KErrNone) + { + ERR_PRINTF2(_L("UPS Database Deletion attempt failed ( %d )"), err); + } + else + { + INFO_PRINTF1(_L("UPS Database Deleted.")); + } + + SetTestStepError(err); + + return TestStepResult(); + } + +TVerdict CIpUpsDeleteDecisionDB::doTestStepPostambleL() +/** + * @return - TVerdict code + */ + { + return TestStepResult(); + }