//
// 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_sendsiprequest
//! @SYMScriptTestEnvironment This test script requires a basic ROM.

///////////////////////////////////////////////////////////////////////////////
// t_csipmessageelements.script

LOAD_SUITE      t_sipclientapi
DELAY           2000


START_TESTCASE t_csipmessageelements-0001
//! @SYMTestCaseID          t_csipmessageelements-0001
//! @SYMAuthor              Jasper Li
//! @SYMCreationDate        08/27/2009
//! @SYMAPI                 CSIPMessageElements::NewL()
//! @SYMTestCaseDesc        Creates a CSIPMessageElements object.
//! @SYMTestActions         1. Creates a CSIPMessageElements object
//!                         2. Destroys the object
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        Low
//! @SYMTestExpectedResults The the object is created successfully.
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipclientapi                \SIP\sipclient\t_csipmessageelements.ini
        CREATE_OBJECT       CSIPMessageElements           sipmessageelements
        CREATE_OBJECT       CSIP                          sip
        COMMAND             sip                           NewL              t_csipmessageelements-0001-NewL_Command01
        COMMAND             sipmessageelements            NewL
        COMMAND             sipmessageelements            ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE		    t_csipmessageelements-0001



START_TESTCASE t_csipmessageelements-0002
//! @SYMTestCaseID          t_csipmessageelements-0002
//! @SYMAuthor              Jasper Li
//! @SYMCreationDate        08/27/2009
//! @SYMAPI                 CSIPMessageElements::NewLC()
//! @SYMTestCaseDesc        Creates a CSIPMessageElements object.
//! @SYMTestActions         1. Creates a CSIPMessageElements object
//!                         2. Destroys the object
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        Low
//! @SYMTestExpectedResults The the object is created successfully.
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipclientapi                \SIP\sipclient\t_csipmessageelements.ini
        CREATE_OBJECT       CSIPMessageElements           sipmessageelements
        CREATE_OBJECT       CSIP                          sip
        COMMAND             sip                           NewL              t_csipmessageelements-0002-NewL_Command01
        COMMAND             sipmessageelements            NewLC
        COMMAND             sipmessageelements            ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE		    t_csipmessageelements-0002


START_TESTCASE t_csipmessageelements-0003
//! @SYMTestCaseID          t_csipmessageelements-0003
//! @SYMAuthor              Jasper Li
//! @SYMCreationDate        08/27/2009
//! @SYMAPI                 CSIPMessageElements::SetUserHeadersL(RPointerArray< CSIPHeaderBase > &)
//!                         CSIPMessageElements::UserHeaders()
//! @SYMTestCaseDesc        Set and get the siptoheader.
//! @SYMTestActions         1. Creates a CSIPMessageElements object
//!                         2. Create a CSIPExpiresHeader object
//!                         3. Set SIP expires header
//!                         4. Get SIP expires header, chen check it content.
//!                         5. Destroys the object
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults Expires header is set and got successfully.
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipclientapi                \SIP\sipclient\t_csipmessageelements.ini
        CREATE_OBJECT       CSIPMessageElements           sipmessageelements
        CREATE_OBJECT       CSIPExpiresHeader             expiresheader
        CREATE_OBJECT       CSIP                          sip
        COMMAND             sip                           NewL            t_csipmessageelements-0003-NewL_Command01
        COMMAND             sipmessageelements            NewL
        COMMAND             expiresheader                 NewL            t_csipmessageelements-0003-NewL_Command02
        COMMAND             sipmessageelements            SetUserHeadersL t_csipmessageelements-0003-SetUserHeadersL_Command03
        COMMAND             sipmessageelements            UserHeaders
        COMMAND             sipmessageelements            ~
        COMMAND             expiresheader                 ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE		    t_csipmessageelements-0003


START_TESTCASE t_csipmessageelements-0004
//! @SYMTestCaseID          t_csipmessageelements-0004
//! @SYMAuthor              Jasper Li
//! @SYMCreationDate        08/27/2009
//! @SYMAPI                 CSIPMessageElements::SetContentL(HBufC8 *, CSIPContentTypeHeader *)
//!                         CSIPMessageElements::Content()
//!                         CSIPMessageElements::ContentType()
//!                         CSIPMessageElements::ExtractContent()
//! @SYMTestCaseDesc        Creates a CSIPMessageElements object.
//! @SYMTestActions         1. Creates a CSIPMessageElements object
//!                         2. Create a CSIPContentTypeHeader object
//!                         3. Set SIP fromheader
//!                         4. Get SIP fromheader
//!                         5. Destroys the object
//! @SYMTestStatus          Implemented
//! @SYMTestPriority        High
//! @SYMTestExpectedResults Content type header is set and got successfully.
//! @SYMTestType            CIT
    START_TEST_BLOCK    100 t_sipclientapi                \SIP\sipclient\t_csipmessageelements.ini
        CREATE_OBJECT       CSIPMessageElements           sipmessageelements
        CREATE_OBJECT       CSIPContentTypeHeader         contenttypeheader
        CREATE_OBJECT       CSIPContentTypeHeader         contenttypeheader1
        CREATE_OBJECT       CSIP                          sip
        COMMAND             sip                           NewL              t_csipmessageelements-0004-NewL_Command01
        COMMAND             sipmessageelements            NewL
        COMMAND             contenttypeheader             NewL              t_csipmessageelements-0004-NewL_Command02
        COMMAND             sipmessageelements            SetContentL       t_csipmessageelements-0004-SetContentL_Command03
        COMMAND             sipmessageelements            Content           t_csipmessageelements-0004-ContentL_Command04
        COMMAND             sipmessageelements            ContentType       t_csipmessageelements-0004-ContentType_Command05
        COMMAND             contenttypeheader1            MediaType         t_csipmessageelements-0004-MediaType_Command06
        COMMAND             contenttypeheader1            MediaSubtype      t_csipmessageelements-0004-MediaSubtype_Command07
        COMMAND             sipmessageelements            ExtractContent    t_csipmessageelements-0004-ExtractContent_Command08
        COMMAND             sipmessageelements            ~
        COMMAND             contenttypeheader             ~
        COMMAND             contenttypeheader1            ~
        COMMAND             sip                           ~
    END_TEST_BLOCK
END_TESTCASE		    t_csipmessageelements-0004
