// 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:
//
//! @file			tld_query_post-config_test.script
//
// Description:
// @internalAll
//

PRINT Running_TLD_Functionality_Test

// Load the test
LOAD_SUITE	TestWListBListUriServer
LOAD_SUITE	systemtest_security
//Load for Backup and Restore
LOAD_SUITE  burtestserver


START_TESTCASE                IWS-WLBL-TLD-CIT-POS-0008
//! @SYMTestCaseID              IWS-WLBL-TLD-CIT-POS-0008
//! @SYMTestCaseDesc            Test the Querying on TLD Policy data functionality.
//!                             The after market policy data in the configuration file should be added to database when database is initialised.
//!                             When client Query for TLD Policy data, InetUriListServer should be able to fetch the requested White/Black List character set.
//! @SYMTestPriority            High
//! @SYMTestActions             1. Install the upgrade sis file containing after market policy data in TLD policy file .
//!                             2. This Policy file should be read and added/updated to the database when the InetUriListServer starts after installation.
//!                             3. Client Query for TLD Policy data (available in after market policy data) with required parameters.
//!                             4. InetUriListServer fetches the requested White/Black List character set for requested TLD.
//!								Install c:\testdata\sisupgrade\ineturilist_maxentries.sis
//!								Re-Install c:\testdata\sisupgrade\ineturilist_duplicate.sis
//! @SYMTestExpectedResults     The expected policy data is fetched for requested TLD (available in after market policy data).
//! @SYMREQ						REQ11517, REQ11519, REQ11521, REQ11664, REQ11665, REQ11666
//! @SYMTestType                CIT
//! @SYMTestStatus              1. Under Development

PRINT  Executing Deletion of existing database
//! Delete the existing database and forcing to create new database
RUN_UTILS DeleteFile c:\private\10281e17\[20009D70]URIList.dat
PRINT  Executing AppInstall
RUN_TEST_STEP	1000	systemtest_security	AppInstall		c:\testdata\ini\TestWListBListUriSuite.ini	isolated_app_max
PRINT  Executing Query TLD List Type

//! White List type
RUN_TEST_STEP 	100 	TestWListBListUriServer     TestTldPolicyStep 	c:\testdata\ini\testldpolicy.ini  Query_Tld_WhiteList_5

//! Black List type
RUN_TEST_STEP 	100 	TestWListBListUriServer     TestTldPolicyStep 	c:\testdata\ini\testldpolicy.ini  Query_Tld_BlackList_5

PRINT  Executing Query TLD Policy data
//! White List type
RUN_TEST_STEP 	100 	TestWListBListUriServer     TestTldPolicyStep 	c:\testdata\ini\testldpolicy.ini  Query_Tld_Policy_WhiteList_3

//! Black List type
RUN_TEST_STEP 	100 	TestWListBListUriServer     TestTldPolicyStep 	c:\testdata\ini\testldpolicy.ini  Query_Tld_Policy_BlackList_4

PRINT ----------------------------------------------
PRINT  Test Backup
PRINT ----------------------------------------------
RUN_TEST_STEP 100 burtestserver TestBackup c:\testdata\ini\TestWListBListUriSuite.ini backuprestore

PRINT ----------------------------------------------
PRINT  Test Restore
PRINT ----------------------------------------------
RUN_TEST_STEP 100 burtestserver TestRestore c:\testdata\ini\TestWListBListUriSuite.ini backuprestore
PRINT ----------------------------------------------
PRINT  Testing the tests after Restore
PRINT ----------------------------------------------

PRINT  Executing AppInstall after Restore of database -- ReInstallation with Different sis file
RUN_TEST_STEP	1000	systemtest_security	AppInstall		c:\testdata\ini\TestWListBListUriSuite.ini	isolated_app_duplicate


//! White List type
RUN_TEST_STEP 	100 	TestWListBListUriServer     TestTldPolicyStep 	c:\testdata\ini\testldpolicy.ini  Query_Tld_WhiteList_5

//! Black List type
RUN_TEST_STEP 	100 	TestWListBListUriServer     TestTldPolicyStep 	c:\testdata\ini\testldpolicy.ini  Query_Tld_BlackList_5

PRINT  Executing Query TLD Policy data
//! White List type
RUN_TEST_STEP 	100 	TestWListBListUriServer     TestTldPolicyStep 	c:\testdata\ini\testldpolicy.ini  Query_Tld_Policy_WhiteList_3

//! Black List type
RUN_TEST_STEP 	100 	TestWListBListUriServer     TestTldPolicyStep 	c:\testdata\ini\testldpolicy.ini  Query_Tld_Policy_BlackList_4
RUN_TEST_STEP 	100 	TestWListBListUriServer     TestTldPolicyStep 	c:\testdata\ini\testldpolicy.ini  Query_Tld_Policy_BlackList_5

END_TESTCASE                  IWS-WLBL-TLD-CIT-POS-0008



