//
// 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-P81124
//! @file
//! @SYMTestCaseID PIM-APPENG-CNTMODEL-CIT-P81124
//! @SYMTestType CIT
//! @SYMTestPriority High
//! @SYMPREQ 811
//! @SYMTestCaseDesc Empty template Test
//! @SYMTestActions create template with no fields (empty fieldset)
//! create contact based on template
//! count the number of fields in the contact
//! @SYMTestExpectedResults Check that the number of field is 0
RUN_TEST_STEP 100 CntPerfTestServer CustomTemplateTest c:\CntPerfTest\configs\cntperftest.ini Empty
END_TESTCASE PIM-APPENG-CNTMODEL-CIT-P81124

START_TESTCASE PIM-APPENG-CNTMODEL-CIT-P81125
//! @file
//! @SYMTestCaseID PIM-APPENG-CNTMODEL-CIT-P81125
//! @SYMTestType CIT
//! @SYMTestPriority High
//! @SYMPREQ 811
//! @SYMTestCaseDesc Full template Test
//! @SYMTestActions create template with all fields
//! create contact based on template
//! count the number of fields in the contact
//! @SYMTestExpectedResults Check that the number of field is equal to number of fields in template
RUN_TEST_STEP 100 CntPerfTestServer CustomTemplateTest c:\CntPerfTest\configs\cntperftest.ini Full
END_TESTCASE PIM-APPENG-CNTMODEL-CIT-P81125

START_TESTCASE PIM-APPENG-CNTMODEL-CIT-P81126
//! @file
//! @SYMTestCaseID PIM-APPENG-CNTMODEL-CIT-P81126
//! @SYMTestType CIT
//! @SYMTestPriority High
//! @SYMPREQ 811
//! @SYMTestCaseDesc Modified template Test
//! @SYMTestActions create template then set all its fields to preset values
//! create contact based on template
//! repeate test where contact is loaded minimally
//! @SYMTestExpectedResults check that all field values, labels, uids match between template and contact
RUN_TEST_STEP 100 CntPerfTestServer CustomTemplateTest c:\CntPerfTest\configs\cntperftest.ini Modified
RUN_TEST_STEP 100 CntPerfTestServer CustomTemplateTest c:\CntPerfTest\configs\cntperftest.ini MinimalModified
END_TESTCASE PIM-APPENG-CNTMODEL-CIT-P81126

START_TESTCASE PIM-APPENG-CNTMODEL-CIT-P81127
//! @file
//! @SYMTestCaseID PIM-APPENG-CNTMODEL-CIT-P81127
//! @SYMTestType CIT
//! @SYMTestPriority High
//! @SYMPREQ 811
//! @SYMTestCaseDesc Template plus custom new fields Test
//! @SYMTestActions create template 
//! add 10 new custom fields to template
//! set all fields to preset values
//! create contact based on template
//! repeat test where all existing fields are deleted before adding the custom fields
//! @SYMTestExpectedResults check that all field values, labels, uids match between template and contact
RUN_TEST_STEP 100 CntPerfTestServer CustomTemplateTest c:\CntPerfTest\configs\cntperftest.ini CustomNew
RUN_TEST_STEP 100 CntPerfTestServer CustomTemplateTest c:\CntPerfTest\configs\cntperftest.ini OnlyNew
END_TESTCASE PIM-APPENG-CNTMODEL-CIT-P81127

START_TESTCASE PIM-APPENG-CNTMODEL-CIT-P81128
//! @file
//! @SYMTestCaseID PIM-APPENG-CNTMODEL-CIT-P81128
//! @SYMTestType CIT
//! @SYMTestPriority High
//! @SYMPREQ 811
//! @SYMTestCaseDesc System and custom template dynamic loading Test
//! @SYMTestActions create template
//! create contact based on template
//! delete 1 field from template 
//! reload contact
//! compare contact to template
//! repeat for all fields
//! repeat test for contact based on system template
//! @SYMTestExpectedResults check that all field values, labels, uids match between template and contact
RUN_TEST_STEP 100 CntPerfTestServer CustomTemplateTest c:\CntPerfTest\configs\cntperftest.ini Dynamic
END_TESTCASE PIM-APPENG-CNTMODEL-CIT-P81128

START_TESTCASE PIM-APPENG-CNTMODEL-CIT-P81129
//! @file
//! @SYMTestCaseID PIM-APPENG-CNTMODEL-CIT-P81129
//! @SYMTestType CIT
//! @SYMTestPriority High
//! @SYMPREQ 811
//! @SYMTestCaseDesc System and custom template with custom labels and uids Test
//! @SYMTestActions set custom labels and uids for all fields in  template. 
//! create contact based on template. 
//! check contact matches template. 
//! repeat for contact based on system template
//! @SYMTestExpectedResults check that all field values, labels, uids match between template and contact
RUN_TEST_STEP 100 CntPerfTestServer CustomTemplateTest c:\CntPerfTest\configs\cntperftest.ini CustomLabelUid
END_TESTCASE PIM-APPENG-CNTMODEL-CIT-P81129

START_TESTCASE PIM-APPENG-CNTMODEL-CIT-P81130
//! @file
//! @SYMTestCaseID PIM-APPENG-CNTMODEL-CIT-P81130
//! @SYMTestType CIT
//! @SYMTestPriority High
//! @SYMPREQ 811
//! @SYMTestCaseDesc Deletion of system template Test
//! @SYMTestActions attempt to delete system template
//! check system template
//! check contacts based on system template
//! @SYMTestExpectedResults delete fails and any contacts based on system template are not affected.
RUN_TEST_STEP 100 CntPerfTestServer CustomTemplateTest c:\CntPerfTest\configs\cntperftest.ini DeleteCustom
END_TESTCASE PIM-APPENG-CNTMODEL-CIT-P81130

START_TESTCASE PIM-APPENG-CNTMODEL-CIT-P81131
//! @file
//! @SYMTestCaseID PIM-APPENG-CNTMODEL-CIT-P81131
//! @SYMTestType CIT
//! @SYMTestPriority High
//! @SYMPREQ 811
//! @SYMTestCaseDesc Deletion of custom template Test
//! @SYMTestActions create custom template
//! create contact based on template
//! delete template
//! reload template,
//! check to see it is marked as deleted. 
//! attempt to read contact again. 
//! delete contact 
//! check whether template is still in the database
//! if so delete template
//! @SYMTestExpectedResults Custom template should be marked as deleted
//! Template, marked as deleted, is not deleted after all contacts based on it are deleted.
RUN_TEST_STEP 100 CntPerfTestServer CustomTemplateTest c:\CntPerfTest\configs\cntperftest.ini DeleteSystem
END_TESTCASE PIM-APPENG-CNTMODEL-CIT-P81131
