//
// Copyright (c) 2005-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
//! @SYMTestSuiteName   t_sipcodecapi
//! @SYMScriptTestEnvironment This test script requires a basic ROM. An SIP server listening on ports 5060.
//        The communicaion to the server is established using the default connection.
//        The supplied commsdat is set up to use NTRAS on Emulator as well as on H/W.
//! @SYMScriptAutomation  The test suites are fully automated using TestDriver and Testexecute

/////////////////////////////////////////////////////////////////////
// t_csiptoheader
//
// Tests all public elements of the t_csiptoheader
// classes as a means of confidence that the APIs work as expected.
//
// The purpose is to provide a regression test suite of PublishedAll APIs for CSIPToHeader
// The tests are fully automated.
/////////////////////////////////////////////////////////////////////

LOAD_SUITE  t_sipcodecapi
DELAY   2000

//***********Defined in CSIPToHeader*************//
START_TESTCASE              t_csiptoheader-0001
//! @SYMTestCaseID          t_csiptoheader-0001
//! @SYMAuthor              Simon Zhang
//! @SYMCreationDate        27/10/2009
//! @SYMAPI                 CSIPToHeader::DecodeL(const TDesC8& aValue) 
//! @SYMTestCaseDesc        Construct and destruct CSIPToHeader object.
//! @SYMTestActions         1. Construct a CSIP object 
//!                         2. Construct a CSIPToHeader object using DecodeL.
//!                         3. Delete all objects.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults The CSIPToHeader object can be created and deleted successfully
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipcodecapi                     \SIP\sipcodec\t_csiptoheader.ini
        CREATE_OBJECT       CSIP                              sip
        CREATE_OBJECT       CSIPToHeader                      siptoheader
        COMMAND             sip                               NewL             t_csiptoheader-0001-NewL_Command01
        COMMAND             siptoheader                       DecodeL          t_csiptoheader-0001-DecodeL_Command02
        COMMAND             siptoheader                       ~
        COMMAND             sip                               ~
    END_TEST_BLOCK
END_TESTCASE      t_csiptoheader-0001

START_TESTCASE              t_csiptoheader-0002
//! @SYMTestCaseID          t_csiptoheader-0002
//! @SYMAuthor              Simon Zhang
//! @SYMCreationDate        27/10/2009
//! @SYMAPI                 CSIPToHeader::NewL(CSIPAddress* aSIPAddress) 
//! @SYMTestCaseDesc        Constructs a CSIPToHeader from textual representation.
//! @SYMTestActions         1. Construct a CSIP object 
//!                         2. Construct a CSIPAddress object.
//!                         3. Construct a CSIPToHeader object using NewL.
//!                         4. Delete all objects.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults The CSIPToHeader object can be created and deleted successfully
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipcodecapi                     \SIP\sipcodec\t_csiptoheader.ini
        CREATE_OBJECT       CSIP                              sip
        CREATE_OBJECT       CSIPAddress                       sipaddress
        CREATE_OBJECT       CSIPToHeader                      siptoheader
        COMMAND             sip                               NewL             t_csiptoheader-0002-NewL_Command01
        COMMAND             sipaddress                        NewL             t_csiptoheader-0002-NewL_Command02
        COMMAND             siptoheader                       NewL             t_csiptoheader-0002-NewL_Command03
        COMMAND             siptoheader                       ~
        COMMAND             sipaddress                        ~
        COMMAND             sip                               ~
    END_TEST_BLOCK
END_TESTCASE      t_csiptoheader-0002


START_TESTCASE              t_csiptoheader-0003
//! @SYMTestCaseID          t_csiptoheader-0003
//! @SYMAuthor              Simon Zhang
//! @SYMCreationDate        27/10/2009
//! @SYMAPI                 CSIPToHeader::NewLC(CSIPAddress* aSIPAddress) 
//! @SYMTestCaseDesc        Construct and destruct CSIPToHeader object.
//! @SYMTestActions         1. Construct a CSIP object 
//!                         2. Construct a CSIPAddress object.
//!                         3. Construct a CSIPToHeader object using NewLC.
//!                         4. Delete all objects.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults The CSIPToHeader object can be created and deleted successfully
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipcodecapi                      	\SIP\sipcodec\t_csiptoheader.ini
        CREATE_OBJECT       CSIP                                sip
        CREATE_OBJECT       CSIPAddress                         sipaddress
        CREATE_OBJECT       CSIPToHeader                      	siptoheader
        COMMAND             sip                                 NewL             t_csiptoheader-0003-NewL_Command01
        COMMAND             sipaddress                          NewL             t_csiptoheader-0003-NewL_Command02
        COMMAND             siptoheader                       	NewLC            t_csiptoheader-0003-NewLC_Command03
        COMMAND             siptoheader                       	~
        COMMAND             sipaddress                          ~
        COMMAND             sip                                 ~
    END_TEST_BLOCK
END_TESTCASE      t_csiptoheader-0003


START_TESTCASE              t_csiptoheader-0004
//! @SYMTestCaseID          t_csiptoheader-0004
//! @SYMAuthor              Simon Zhang
//! @SYMCreationDate        27/10/2009
//! @SYMAPI                 CSIPToHeader::NewL(const CSIPFromToHeaderBase& aHeader) 
//! @SYMTestCaseDesc        Construct and destruct CSIPToHeader object,Creates a deep-copy of a CSIPFromToHeaderBase.
//! @SYMTestActions         1. Construct a CSIP object 
//!                         2. Construct a CSIPAddress object.
//!                         3. Construct a CSIPToHeader object.
//!                         4. Construct a new CSIPToHeader object with an exist CSIPToHeader object.
//!                         5. Delete all objects.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults The CSIPToHeader object can be created and deleted successfully
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipcodecapi                      	\SIP\sipcodec\t_csiptoheader.ini
        CREATE_OBJECT       CSIP                                sip
        CREATE_OBJECT       CSIPAddress                         sipaddress
        CREATE_OBJECT       CSIPToHeader                      	siptoheader
        CREATE_OBJECT       CSIPToHeader                      	siptoheader1
        COMMAND             sip                                 NewL             t_csiptoheader-0004-NewL_Command01
        COMMAND             sipaddress                          NewL             t_csiptoheader-0004-NewL_Command02
        COMMAND             siptoheader                       	NewL             t_csiptoheader-0004-NewL_Command03
        COMMAND             siptoheader1                      	NewL             t_csiptoheader-0004-NewL_Command04
        COMMAND             siptoheader1                      	~
        COMMAND             siptoheader                       	~
        COMMAND             sipaddress                          ~
        COMMAND             sip                                 ~
    END_TEST_BLOCK
END_TESTCASE      t_csiptoheader-0004


START_TESTCASE              t_csiptoheader-0005
//! @SYMTestCaseID          t_csiptoheader-0005
//! @SYMAuthor              Simon Zhang
//! @SYMCreationDate        27/10/2009
//! @SYMAPI                 CSIPtoheader::NewLC(const CSIPFromToHeaderBase& aHeader) 
//! @SYMTestCaseDesc        Construct and destruct CSIPToHeader object,Creates a deep-copy of a CSIPFromToHeaderBase.
//! @SYMTestActions         1. Construct a CSIP object 
//!                         2. Construct a CSIPAddress object.
//!                         3. Construct a CSIPToHeader object.
//!                         4. Construct a new CSIPToHeader object with a exist CSIPToHeader object.
//!                         5. Delete all objects.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults The CSIPToHeader object can be created and deleted successfully
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipcodecapi                      	\SIP\sipcodec\t_csiptoheader.ini
        CREATE_OBJECT       CSIP                                sip
        CREATE_OBJECT       CSIPAddress                         sipaddress
        CREATE_OBJECT       CSIPAddress                         sipaddress1
        CREATE_OBJECT       CSIPToHeader                        siptoheader
        CREATE_OBJECT       CSIPToHeader                      	siptoheader1
        COMMAND             sip                                 NewL             t_csiptoheader-0005-NewL_Command01
        COMMAND             sipaddress                          NewL             t_csiptoheader-0005-NewL_Command02
        COMMAND             siptoheader                         NewL             t_csiptoheader-0005-NewL_Command03
        COMMAND             siptoheader1                       	NewLC            t_csiptoheader-0005-NewLC_Command04
        COMMAND             siptoheader1                       	SIPAddress       t_csiptoheader-0005-SIPAddress_Command05
        COMMAND             sipaddress1                         Uri8             t_csiptoheader-0005-Uri8_Command06
        COMMAND             sipaddress1                         ~
        COMMAND             siptoheader1                       	~
        COMMAND             siptoheader                         ~
        COMMAND             sipaddress                          ~
        COMMAND             sip                                 ~
    END_TEST_BLOCK
END_TESTCASE      t_csiptoheader-0005


START_TESTCASE              t_csiptoheader-0006
//! @SYMTestCaseID          t_csiptoheader-0006
//! @SYMAuthor              Simon Zhang
//! @SYMCreationDate        19/10/2009
//! @SYMAPI                 CSIPToHeader::InternalizeValueL(RReadStream& aReadStream) 
//! @SYMTestCaseDesc        Construct and destruct CSIPToHeader object.
//! @SYMTestActions         1. Construct a CSIP object 
//!                         2. Construct a CSIPAddress object.
//!                         3. Construct a CSIPToHeader object using InternalizeValueL.
//!                         4. Delete all objects.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults The CSIPToHeader object can be created and deleted successfully
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipcodecapi                      	\SIP\sipcodec\t_csiptoheader.ini
        CREATE_OBJECT       CSIP                                sip
        CREATE_OBJECT       CSIPAddress                         sipaddress
        CREATE_OBJECT       CSIPAddress                         sipaddress1
        CREATE_OBJECT       CSIPToHeader                      	siptoheader
        CREATE_OBJECT       CSIPToHeader                      	siptoheader1
        COMMAND             sip                                 NewL               t_csiptoheader-0006-NewL_Command01
        COMMAND             sipaddress                          NewL               t_csiptoheader-0006-NewL_Command02
        COMMAND             siptoheader                       	NewL               t_csiptoheader-0006-NewL_Command03
        COMMAND             siptoheader                       	ExternalizeL       t_csiptoheader-0006-ExternalizeL_Command04
        COMMAND             siptoheader1                      	InternalizeValueL  t_csiptoheader-0006-InternalizeValueL_Command05
        COMMAND             siptoheader1                      	SIPAddress         t_csiptoheader-0006-SIPAddress_Command06
        COMMAND             sipaddress1                         Uri8               t_csiptoheader-0006-Uri8_Command07
        COMMAND             sipaddress1                         ~
        COMMAND             siptoheader1                      	~
        COMMAND             siptoheader                       	~
        COMMAND             sipaddress                          ~
        COMMAND             sip                                 ~
    END_TEST_BLOCK
END_TESTCASE      t_csiptoheader-0006

START_TESTCASE              t_csiptoheader-0007
//! @SYMTestCaseID          t_csiptoheader-0007
//! @SYMAuthor              Simon Zhang
//! @SYMCreationDate        27/10/2009
//! @SYMAPI                 CSIPToHeader::CloneL() 
//! @SYMTestCaseDesc        Creates a deep-copy of this CSIPToHeader object.
//! @SYMTestActions         1. Construct a CSIP object 
//!                         2. Construct a CSIPAddress object.
//!                         3. Construct a CSIPToHeader object.
//!                         4. Clone a CSIPToHeader object.
//!                         5. Delete all objects.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults The CSIPToHeader object can be cloned successfully
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipcodecapi                      	\SIP\sipcodec\t_csiptoheader.ini
        CREATE_OBJECT       CSIP                                sip
        CREATE_OBJECT       CSIPAddress                         sipaddress
        CREATE_OBJECT       CSIPToHeader                      	siptoheader
        CREATE_OBJECT       CSIPToHeader                      	siptoheader1
        COMMAND             sip                                 NewL             t_csiptoheader-0007-NewL_Command01
        COMMAND             sipaddress                          NewL             t_csiptoheader-0007-NewL_Command02
        COMMAND             siptoheader                       	NewL             t_csiptoheader-0007-NewL_Command03
        COMMAND             siptoheader                       	CloneL           t_csiptoheader-0007-CloneL_Command04
        COMMAND             siptoheader1                       	Name             t_csiptoheader-0007-Name_Command05        
        COMMAND             siptoheader1                      	~
        COMMAND             siptoheader                       	~
        COMMAND             sipaddress                          ~
        COMMAND             sip                                 ~
    END_TEST_BLOCK
END_TESTCASE      t_csiptoheader-0007

START_TESTCASE              t_csiptoheader-0008
//! @SYMTestCaseID          t_csiptoheader-0008
//! @SYMAuthor              Simon Zhang
//! @SYMCreationDate        27/10/2009
//! @SYMAPI                 CSIPToHeader::Name() 
//! @SYMTestCaseDesc        Creates a deep-copy of this CSIPToHeader object.
//! @SYMTestActions         1. Construct a CSIP object 
//!                         2. Construct a CSIPAddress object.
//!                         3. Construct a CSIPToHeader object.
//!                         4. Gets the full name of the CSIPToHeader.
//!                         5. Delete all objects.
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults Get the correct header name.
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipcodecapi                      	\SIP\sipcodec\t_csiptoheader.ini
        CREATE_OBJECT       CSIP                                sip
        CREATE_OBJECT       CSIPAddress                         sipaddress
        CREATE_OBJECT       CSIPToHeader                      	siptoheader
        COMMAND             sip                                 NewL             t_csiptoheader-0008-NewL_Command01
        COMMAND             sipaddress                          NewL             t_csiptoheader-0008-NewL_Command02
        COMMAND             siptoheader                       	NewL             t_csiptoheader-0008-NewL_Command03
        COMMAND             siptoheader                       	Name             t_csiptoheader-0008-Name_Command04
        COMMAND             siptoheader                       	~
        COMMAND             sipaddress                          ~
        COMMAND             sip                                 ~
    END_TEST_BLOCK
END_TESTCASE      t_csiptoheader-0008
