//
// 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.

///////////////////////////////////////////////////////////////////////////////
// t_csipproxyrequireheader.script

LOAD_SUITE      t_sipcodecapi
DELAY           2000

START_TESTCASE t_csipproxyrequireheader-0001
//! @SYMTestCaseID          t_csipproxyrequireheader-0001
//! @SYMAuthor              Dorothy Zhang   
//! @SYMCreationDate        12/11/2009
//! @SYMAPI                 CSIPProxyRequireHeader::NewL(RStringF)
//! @SYMTestCaseDesc        Creates a CSIPProxyRequireHeader object.
//! @SYMTestActions         1. Creates a CSIPProxyRequireHeader object
//!                         2. Destroys the object
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        Low
//! @SYMTestExpectedResults The the object is created successfully.
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipcodecapi                     \SIP\sipcodec\t_csipproxyrequireheader.ini
        CREATE_OBJECT       CSIPProxyRequireHeader                     sipproxyrequireheader
        CREATE_OBJECT       CSIP                                sip
        COMMAND             sip                                 NewL             t_csipproxyrequireheader-0001-NewL_Command01
        COMMAND             sipproxyrequireheader                      NewL             t_csipproxyrequireheader-0001-NewL_Command03
        COMMAND             sipproxyrequireheader                      ~
        COMMAND             sip                                 ~
    END_TEST_BLOCK
END_TESTCASE		    t_csipproxyrequireheader-0001

START_TESTCASE t_csipproxyrequireheader-0002
//! @SYMTestCaseID          t_csipproxyrequireheader-0002
//! @SYMAuthor              Dorothy Zhang
//! @SYMCreationDate        12/11/2009
//! @SYMAPI                 CSIPProxyRequireHeader::NewLC(RStringF)
//! @SYMTestCaseDesc        Creates a CSIPProxyRequireHeader object.
//! @SYMTestActions         1. Creates a CSIPProxyRequireHeader object
//!                         2. Destroys the object
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        Low
//! @SYMTestExpectedResults The the object is created successfully.
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipcodecapi                     \SIP\sipcodec\t_csipproxyrequireheader.ini
        CREATE_OBJECT       CSIPProxyRequireHeader           sipproxyrequireheader
        CREATE_OBJECT       CSIP                                sip
        COMMAND             sip                                 NewL             t_csipproxyrequireheader-0002-NewL_Command01
        COMMAND             sipproxyrequireheader                      NewLC            t_csipproxyrequireheader-0002-NewLC_Command03
        COMMAND             sipproxyrequireheader                      ~
        COMMAND             sip                                 ~
    END_TEST_BLOCK
END_TESTCASE		    t_csipproxyrequireheader-0002

START_TESTCASE t_csipproxyrequireheader-0003
//! @SYMTestCaseID          t_csipproxyrequireheader-0003
//! @SYMAuthor              Dorothy Zhang
//! @SYMCreationDate        12/11/2009
//! @SYMAPI                 CSIPProxyRequireHeader::DecodeL(const TDesC8&)
//! @SYMTestCaseDesc        Creates a CSIPProxyRequireHeader object.
//! @SYMTestActions         1. Creates a CSIPProxyRequireHeader object
//!                         2. Decode the header value
//!                         3. Check the instance via encode the header's value 
//!                         4. Destroys the object
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        Low
//! @SYMTestExpectedResults The the object is created successfully.
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipcodecapi                     \SIP\sipcodec\t_csipproxyrequireheader.ini
        CREATE_OBJECT       CSIPProxyRequireHeader           sipproxyrequireheader
        CREATE_OBJECT       CSIP                                sip
        COMMAND             sip                                 NewL             t_csipproxyrequireheader-0003-NewL_Command01
        COMMAND             sipproxyrequireheader                      DecodeL            t_csipproxyrequireheader-0003-DecodeL_Command03
        COMMAND             sipproxyrequireheader                      ToTextValueL       t_csipproxyrequireheader-0003-ToTextValueL_Command04
        COMMAND             sipproxyrequireheader                      ~
        END_TEST_BLOCK
END_TESTCASE		    t_csipproxyrequireheader-0003


START_TESTCASE              t_csipproxyrequireheader-0004
//! @SYMTestCaseID          t_csipproxyrequireheader-0004
//! @SYMAuthor              Dorothy Zhang
//! @SYMCreationDate        12/11/2009
//! @SYMAPI                 CSIPProxyRequireHeader::InternalizeValueL(RReadStream &)
//! @SYMTestCaseDesc        Creates a CSIPProxyRequireHeader object.
//! @SYMTestActions         1. Creates a CSIPProxyRequireHeader object
//!                         2. Externalize the value to a file
//!                         3. Internalize the value from a file
//!                         4. Check the instance via get the name
//!                         5. Destroys the object
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults: 1. InternalizeValueL() is called without errors;
//!                          2. The retrieved name and header's value are expected.
//! @SYMTestType            CIT

    START_TEST_BLOCK        100   t_sipcodecapi          \sip\sipcodec\t_csipproxyrequireheader.ini
        CREATE_OBJECT       CSIPProxyRequireHeader           sipproxyrequireheader
        CREATE_OBJECT       CSIP                                sip
        COMMAND             sip                                 NewL             t_csipproxyrequireheader-0004-NewL_Command01
        COMMAND             sipproxyrequireheader            NewL              t_csipproxyrequireheader-0004-NewL_Command03
        COMMAND             sipproxyrequireheader          ExternalizeL           t_csipproxyrequireheader-0004-ExternalizeL_command04
        COMMAND             sipproxyrequireheader          InternalizeValueL      t_csipproxyrequireheader-0004-InternalizeValueL_command05
        COMMAND             sipproxyrequireheader          Name                   t_csipproxyrequireheader-0004-Name_command06
        COMMAND             sipproxyrequireheader            ~
        COMMAND             sip                                ~
        END_TEST_BLOCK
END_TESTCASE t_csipproxyrequireheader-0004

START_TESTCASE              t_csipproxyrequireheader-0005
//! @SYMTestCaseID          t_csipproxyrequireheader-0005
//! @SYMAuthor              Dorothy Zhang
//! @SYMCreationDate        12/11/2009
//! @SYMAPI                 CSIPProxyRequireHeader::CloneL()
//! @SYMTestCaseDesc        Creates a CSIPProxyRequireHeader object.
//! @SYMTestActions         1. Creates a CSIPProxyRequireHeader object
//!                         2. Clone the instance
//!                         3. Check the instance via get the name
//!                         4. Destroys the 2 object
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults: The CSIPProxyRequireHeader object is cloned sucessfully
//! @SYMTestType            CIT

    START_TEST_BLOCK        100   t_sipcodecapi          \sip\sipcodec\t_csipproxyrequireheader.ini
        CREATE_OBJECT       CSIP                                sip
        CREATE_OBJECT       CSIPProxyRequireHeader         sipproxyrequireheader
        CREATE_OBJECT       CSIPProxyRequireHeader         sipproxyrequireheader2
        COMMAND             sip                                 NewL             t_csipproxyrequireheader-0005-NewL_Command01
        COMMAND             sipproxyrequireheader          NewL                   t_csipproxyrequireheader-0005-NewL_Command03
        COMMAND             sipproxyrequireheader          CloneL                 t_csipproxyrequireheader-0005-CloneL_command04
        COMMAND             sipproxyrequireheader2         Name                   t_csipproxyrequireheader-0005-Name_command05
        COMMAND             sipproxyrequireheader          ~
        COMMAND             sipproxyrequireheader2         ~
        COMMAND             sip                                ~
        END_TEST_BLOCK
END_TESTCASE t_csipproxyrequireheader-0005

START_TESTCASE              t_csipproxyrequireheader-0006
//! @SYMTestCaseID          t_csipproxyrequireheader-0006
//! @SYMAuthor              Dorothy Zhang
//! @SYMCreationDate        12/11/2009
//! @SYMAPI                 CSIPProxyRequireHeader::Name()
//! @SYMTestCaseDesc        Creates a CSIPProxyRequireHeader object.
//! @SYMTestActions         1. Creates a CSIPProxyRequireHeader object
//!                         2. Get the name
//!                         2. Destroys the object
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults: The CSIPProxyRequireHeader object name is gotten sucessfully
//! @SYMTestType            CIT

    START_TEST_BLOCK        100   t_sipcodecapi          \sip\sipcodec\t_csipproxyrequireheader.ini
        CREATE_OBJECT       CSIPProxyRequireHeader           sipproxyrequireheader
        CREATE_OBJECT       CSIP                                sip
        COMMAND             sip                                 NewL             t_csipproxyrequireheader-0006-NewL_Command01
        COMMAND             sipproxyrequireheader            NewL            t_csipproxyrequireheader-0006-NewL_Command03
        COMMAND             sipproxyrequireheader            Name            t_csipproxyrequireheader-0006-Name_Command04
        COMMAND             sipproxyrequireheader            ~
        COMMAND             sip                                ~
    END_TEST_BLOCK
END_TESTCASE t_csipproxyrequireheader-0006

START_TESTCASE t_csipproxyrequireheader-0007
//! @SYMTestCaseID          t_csipproxyrequireheader-0007
//! @SYMAuthor              Dorothy Zhang
//! @SYMCreationDate        16/11/2009
//! @SYMAPI                 CSIPProxyRequireHeader::DecodeL(const TDesC8&)
//! @SYMTestCaseDesc        Negetive case, try to decode a CSIPProxyRequireHeader object with illegal value
//! @SYMTestActions         1. Creates a CSIPProxyRequireHeader object
//!                         2. Decode the header value with illegal one
//!                         3. Destroys the object
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        Low
//! @SYMTestExpectedResults The KErrSipCodecTokenBaseHeader returns as expected
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipcodecapi                     \SIP\sipcodec\t_csipproxyrequireheader.ini
        CREATE_OBJECT       CSIPProxyRequireHeader           sipproxyrequireheader
        CREATE_OBJECT       CSIP                                sip
        COMMAND             sip                                 NewL             t_csipproxyrequireheader-0007-NewL_Command01
        COMMAND !Error=-17789   sipproxyrequireheader                      DecodeL            t_csipproxyrequireheader-0007-DecodeL_Command03
        COMMAND             sipproxyrequireheader                      ~
        END_TEST_BLOCK
END_TESTCASE		    t_csipproxyrequireheader-0007


