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

LOAD_SUITE      t_sipcodecapi
DELAY           2000

START_TESTCASE t_csipexpiresheader-0001
//! @SYMTestCaseID          t_csipexpiresheader-0001
//! @SYMAuthor              Simon Zhang   
//! @SYMCreationDate        25/11/2009
//! @SYMAPI                 CSIPExpiresHeader::CSIPExpiresHeader(TUint) 
//!							CSIPExpiresHeader::~CSIPExpiresHeader()
//! @SYMTestCaseDesc        Creates a CSIPExpiresHeader object.
//! @SYMTestActions         1. Creates a CSIPExpiresHeader 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_csipexpiresheader.ini
        CREATE_OBJECT       CSIPExpiresHeader            sipexpiresheader
        CREATE_OBJECT       CSIP                         sip
        COMMAND             sip                          NewL              t_csipexpiresheader-0000-NewL_Command01
        COMMAND             sipexpiresheader             NewL			   t_csipexpiresheader-0001-NewL_Command02
        COMMAND             sipexpiresheader             ~
        COMMAND             sip                          ~
    END_TEST_BLOCK
END_TESTCASE		    t_csipexpiresheader-0001

START_TESTCASE t_csipexpiresheader-0002
//! @SYMTestCaseID          t_csipexpiresheader-0002
//! @SYMAuthor              Simon Zhang
//! @SYMCreationDate        25/11/2009
//! @SYMAPI                 CSIPExpiresHeader::DecodeL(const TDesC8 {ref})
//! @SYMTestCaseDesc        Creates a CSIPExpiresHeader object.
//! @SYMTestActions         1. Creates a CSIPExpiresHeader object
//!                         2. Decode the header value
//!                         3. 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_csipexpiresheader.ini
        CREATE_OBJECT       CSIPExpiresHeader            sipexpiresheader
        CREATE_OBJECT       CSIP                         sip
        COMMAND             sip                          NewL             t_csipexpiresheader-0000-NewL_Command01
        COMMAND             sipexpiresheader             DecodeL          t_csipexpiresheader-0002-DecodeL_Command02
        COMMAND             sipexpiresheader             Name             t_csipexpiresheader-0002-Name_command03
        COMMAND             sipexpiresheader             ~
        COMMAND             sip			                 ~
        END_TEST_BLOCK
END_TESTCASE		    t_csipexpiresheader-0002


START_TESTCASE              t_csipexpiresheader-0003
//! @SYMTestCaseID          t_csipexpiresheader-0003
//! @SYMAuthor              Simon Zhang
//! @SYMCreationDate        25/11/2009
//! @SYMAPI                 CSIPExpiresHeader::InternalizeValueL(RReadStream &)
//! @SYMTestCaseDesc        Creates a CSIPExpiresHeader object.
//! @SYMTestActions         1. Creates a CSIPExpiresHeader 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_csipexpiresheader.ini
        CREATE_OBJECT       CSIPExpiresHeader         sipexpiresheader
        CREATE_OBJECT       CSIP                      sip
        COMMAND             sip                       NewL                   t_csipexpiresheader-0000-NewL_Command01
        COMMAND             sipexpiresheader          NewL				     t_csipexpiresheader-0003-NewL_Command02
        COMMAND             sipexpiresheader          ExternalizeL           t_csipexpiresheader-0003-ExternalizeL_command03
        COMMAND             sipexpiresheader          InternalizeValueL      t_csipexpiresheader-0003-InternalizeValueL_command04
        COMMAND             sipexpiresheader          Name                   t_csipexpiresheader-0003-Name_command05      
        COMMAND             sipexpiresheader          ~
        COMMAND             sip                       ~
        END_TEST_BLOCK
END_TESTCASE t_csipexpiresheader-0003

START_TESTCASE              t_csipexpiresheader-0004
//! @SYMTestCaseID          t_csipexpiresheader-0004
//! @SYMAuthor              Simon Zhang
//! @SYMCreationDate        25/11/2009
//! @SYMAPI                 CSIPExpiresHeader::CloneL()
//! @SYMTestCaseDesc        Creates a CSIPExpiresHeader object.
//! @SYMTestActions         1. Creates a CSIPExpiresHeader object
//!                         2. Clone the instance
//!                         2. Destroys the 2 objects
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults: The CSIPExpiresHeader object is cloned sucessfully
//! @SYMTestType            CIT

    START_TEST_BLOCK        100   t_sipcodecapi       \sip\sipcodec\t_csipexpiresheader.ini
        CREATE_OBJECT       CSIP                      sip
        CREATE_OBJECT       CSIPExpiresHeader         sipexpiresheader
        CREATE_OBJECT       CSIPExpiresHeader         sipexpiresheader2
        COMMAND             sip                       NewL             		 t_csipexpiresheader-0000-NewL_Command01
        COMMAND             sipexpiresheader          NewL				     t_csipexpiresheader-0004-NewL_Command02
        COMMAND             sipexpiresheader          CloneL                 t_csipexpiresheader-0004-CloneL_command03
        COMMAND             sipexpiresheader2         Name                   t_csipexpiresheader-0004-Name_command04
        COMMAND             sipexpiresheader          ~
        COMMAND             sipexpiresheader2         ~
        COMMAND             sip                       ~
        END_TEST_BLOCK
END_TESTCASE t_csipexpiresheader-0004

START_TESTCASE              t_csipexpiresheader-0005
//! @SYMTestCaseID          t_csipexpiresheader-0005
//! @SYMAuthor              Simon Zhang
//! @SYMCreationDate        25/11/2009
//! @SYMAPI                 CSIPExpiresHeader::Name()
//! @SYMTestCaseDesc        Creates a CSIPExpiresHeader object.
//! @SYMTestActions         1. Creates a CSIPExpiresHeader object
//!                         2. Get the name
//!                         2. Destroys the object
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults: The CSIPExpiresHeader object name is gotten sucessfully
//! @SYMTestType            CIT

    START_TEST_BLOCK        100   t_sipcodecapi         \sip\sipcodec\t_csipexpiresheader.ini
        CREATE_OBJECT       CSIPExpiresHeader           sipexpiresheader
        CREATE_OBJECT       CSIP                        sip
        COMMAND             sip                         NewL              t_csipexpiresheader-0000-NewL_Command01
        COMMAND             sipexpiresheader            NewL			  t_csipexpiresheader-0005-NewL_Command02
        COMMAND             sipexpiresheader            Name              t_csipexpiresheader-0005-Name_Command03
        COMMAND             sipexpiresheader            ~
        COMMAND             sip                         ~
    END_TEST_BLOCK
END_TESTCASE t_csipexpiresheader-0005

START_TESTCASE t_csipexpiresheader-0006
//! @SYMTestCaseID          t_csipexpiresheader-0006
//! @SYMAuthor              Simon Zhang
//! @SYMCreationDate        25/11/2009
//! @SYMAPI                 CSIPExpiresHeader::DecodeL(const TDesC8 {ref})
//! @SYMTestCaseDesc        Creates a CSIPExpiresHeader object from abnormal textual presentation.
//! @SYMTestActions         1. Creates a CSIPExpiresHeader object
//!                         2. Decode the header value from abnormal textual presentation
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        Low
//! @SYMTestExpectedResults The the object is created successfully.
//! @SYMTestType            CIT
    START_TEST_BLOCK    100   t_sipcodecapi                \SIP\sipcodec\t_csipexpiresheader.ini
        CREATE_OBJECT         CSIPExpiresHeader            sipexpiresheader
        CREATE_OBJECT         CSIP                         sip
        COMMAND               sip                          NewL             t_csipexpiresheader-0000-NewL_Command01
        COMMAND !Error=-17784 sipexpiresheader             DecodeL          t_csipexpiresheader-0006-DecodeL_Command02
        COMMAND               sipexpiresheader             ~
        COMMAND               sip			               ~
        END_TEST_BLOCK
END_TESTCASE		    t_csipexpiresheader-0006