//
// Copyright (c) 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:
//

LOAD_SUITE CntPerfTestServer

START_TESTCASE PIM-APPENG-CNTMODEL-CIT-SQL-P81137
//! @file
//! @SYMTestCaseID PIM-APPENG-CNTMODEL-CIT-SQL-P81137
//! @SYMTestType CIT
//! @SYMTestPriority High
//! @SYMPREQ 811
//! @SYMTestCaseDesc Empty contacts and empty view Test
//! @SYMTestActions Create database 
//! Add ten empty contacts
//! create local view with empty sortorder.
//! Activate active object when view is populated
//! Check value of local view
//! Repeat test for local view accessing PL directly
//! Repeat test for remote view
//! @SYMTestExpectedResults check that the view contains 10 contacts, each containing 1 empty field
RUN_TEST_STEP 100 CntPerfTestServer ContactViewTest c:\CntPerfTest\configs\cntperftest.ini EmptyAll
END_TESTCASE PIM-APPENG-CNTMODEL-CIT-SQL-P81137

START_TESTCASE PIM-APPENG-CNTMODEL-CIT-SQL-P81138
//! @file
//! @SYMTestCaseID PIM-APPENG-CNTMODEL-CIT-SQL-P81138
//! @SYMTestType CIT
//! @SYMTestPriority High
//! @SYMPREQ 811
//! @SYMTestCaseDesc Full contacts and empty view Test
//! @SYMTestActions Create database 
//! Add ten contacts with all fields set to preset values
//! Create local view with empty sort order.
//! Activate active object when view is populated
//! Check value of local view
//! Repeat test for local view accessing PL directly
//! Repeat test for remote view
//! @SYMTestExpectedResults check that the view contains 10 contacts, each containing 1 field that equals to the first field in the missing field list
RUN_TEST_STEP 100 CntPerfTestServer ContactViewTest c:\CntPerfTest\configs\cntperftest.ini FullContacts
END_TESTCASE PIM-APPENG-CNTMODEL-CIT-SQL-P81138

START_TESTCASE PIM-APPENG-CNTMODEL-CIT-SQL-P81139
//! @file
//! @SYMTestCaseID PIM-APPENG-CNTMODEL-CIT-SQL-P81139
//! @SYMTestType CIT
//! @SYMTestPriority High
//! @SYMPREQ 811
//! @SYMTestCaseDesc Empty contacts and Full view Test
//! @SYMTestActions Create database 
//! Add ten empty contacts
//! Create local view with sort order all (existing) uids.
//! Activate active object when view is populated
//! Check value of local view
//! Repeat test for local view accessing PL directly
//! Repeat test for remote view
//! @SYMTestExpectedResults check that the view contains 10 contacts, each containing as many fields as there are uids in the sort order. All fields should be empty.
RUN_TEST_STEP 100 CntPerfTestServer ContactViewTest c:\CntPerfTest\configs\cntperftest.ini FullView
END_TESTCASE PIM-APPENG-CNTMODEL-CIT-SQL-P81139

START_TESTCASE PIM-APPENG-CNTMODEL-CIT-SQL-P81140
//! @file
//! @SYMTestCaseID PIM-APPENG-CNTMODEL-CIT-SQL-P81140
//! @SYMTestType CIT
//! @SYMTestPriority High
//! @SYMPREQ 811
//! @SYMTestCaseDesc Full contacts and Full view Test
//! @SYMTestActions Create database 
//! Add ten contacts with all fields set to preset values
//! Create local view with sort order all (existing) uids.
//! Activate active object when view is populated
//! Check value of local view
//! Repeat test for local view accessing PL directly
//! Repeat test for remote view
//! @SYMTestExpectedResults view contains 10 contacts, each containing as many fields as there are uids (114)
//! all field that have a corresponding uid should be non-empty and equal the appropriate preset value.
RUN_TEST_STEP 100 CntPerfTestServer ContactViewTest c:\CntPerfTest\configs\cntperftest.ini FullAll
END_TESTCASE PIM-APPENG-CNTMODEL-CIT-SQL-P81140

START_TESTCASE PIM-APPENG-CNTMODEL-CIT-SQL-P81141
//! @file
//! @SYMTestCaseID PIM-APPENG-CNTMODEL-CIT-SQL-P81141
//! @SYMTestType CIT
//! @SYMTestPriority High
//! @SYMPREQ 811
//! @SYMTestCaseDesc Contacts with empty fieldsets and Full view Test
//! @SYMTestActions Create database 
//! Add ten contacts with a fieldset containing no fields
//! Create local view with sort order all (existing) uids.
//! Activate active object when view is populated
//! Check value of local view
//! Repeat test for local view accessing PL directly
//! Repeat test for remote view
//! @SYMTestExpectedResults view contains 10 contacts
//! each containing as many fields as there are uids (114)
//! all field should be empty. 
RUN_TEST_STEP 100 CntPerfTestServer ContactViewTest c:\CntPerfTest\configs\cntperftest.ini EmptyFieldset
END_TESTCASE PIM-APPENG-CNTMODEL-CIT-SQL-P81141

START_TESTCASE PIM-APPENG-CNTMODEL-CIT-SQL-P81142
//! @file
//! @SYMTestCaseID PIM-APPENG-CNTMODEL-CIT-SQL-P81142
//! @SYMTestType CIT
//! @SYMTestPriority High
//! @SYMPREQ 811
//! @SYMTestCaseDesc Contacts with empty fieldsets and empty view Test
//! @SYMTestActions Create database 
//! Add ten contacts with a fieldset containing no fields
//! Create local view with empty sort order.
//! Activate active object when view is populated
//! Check value of local view
//! Repeat test for local view accessing PL directly
//! Repeat test for remote view
//! @SYMTestExpectedResults view contains 10 contacts
//! each containing as 1 field
//! that field should be empty.
RUN_TEST_STEP 100 CntPerfTestServer ContactViewTest c:\CntPerfTest\configs\cntperftest.ini EmptyFieldsetView
END_TESTCASE PIM-APPENG-CNTMODEL-CIT-SQL-P81142

START_TESTCASE PIM-APPENG-CNTMODEL-CIT-SQL-P81143
//! @file
//! @SYMTestCaseID PIM-APPENG-CNTMODEL-CIT-SQL-P81143
//! @SYMTestType CIT
//! @SYMTestPriority High
//! @SYMPREQ 811
//! @SYMTestCaseDesc Contacts with 1 or more empty fields and empty view Test
//! @SYMTestActions Create database 
//! Add ten contacts with all fields set to preset values
//! Create local view with empty sort order.
//! Activate active object when view is populated
//! Check value of local view
//! Set the value of field, retrieved in local view, to empty within the contact
//! Repeat test
//! Repeat test for local view accessing PL directly
//! Repeat test for remote view
//! @SYMTestExpectedResults check that the view contains 10 contacts, each containing 1 field that equals to the next field in the missing field list until the last field is reached. After which all fields should be empty
RUN_TEST_STEP 400 CntPerfTestServer ContactViewTest c:\CntPerfTest\configs\cntperftest.ini MissingFields
END_TESTCASE PIM-APPENG-CNTMODEL-CIT-SQL-P81143

START_TESTCASE PIM-APPENG-CNTMODEL-CIT-SQL-P81149
//! @file
//! @SYMTestCaseID PIM-APPENG-CNTMODEL-CIT-SQL-P81149
//! @SYMTestType CIT
//! @SYMTestPriority High
//! @SYMPREQ 811
//! @SYMTestCaseDesc Contact view Performance Test
//! @SYMTestActions Add 1000 type X contacts
//! Load local view that contains uids for name and phone number
//! Measure length of time to complete populating local view
//! Store in Y
//! Repeat test where X equals: empty contacts, partially filled contacts or heavily filled contacts
//! Repeat test for local view accessing PL directly and remote view
//! @SYMTestExpectedResults Y should take less than 5 seconds
RUN_TEST_STEP 10000 CntPerfTestServer ContactViewTest c:\CntPerfTest\configs\cntperftest.ini Performance
END_TESTCASE PIM-APPENG-CNTMODEL-CIT-SQL-P81149

