messagingfw/msgtestfw/TestCases/ScriptedTestCases/Pop3TopTest23.script
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 //
       
     2 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 //
       
    16 
       
    17 RUN_UTILS DeleteFile c:\messaging.db
       
    18 LOAD_SUITE MessagingTestServer -SharedData
       
    19 
       
    20 //CED c:\msgtest\TestFramework\Configurations\CommDbSettings\NtRasLongIdleTimeout.cfg
       
    21 RUN_TEST_STEP 100 MessagingTestServer BEGIN_TEST_CASE
       
    22 
       
    23 
       
    24 RUN_TEST_STEP 100 MessagingTestServer SETUP_TEST_CASE
       
    25 // intial setup, constants, ntras, a session, clean the mail store,
       
    26 // create services, registry, mtms, etc.
       
    27 RUN_TEST_STEP 100 MessagingTestServer GetBaseConstants					c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini GetBaseConstants
       
    28 RUN_TEST_STEP 100 MessagingTestServer InitNtRas							c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini InitNtRas
       
    29 RUN_TEST_STEP 100 MessagingTestServer CreateSession						c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini CreateSession
       
    30 RUN_TEST_STEP 100 MessagingTestServer ResetMessageStore					c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini ResetMessageStore
       
    31 RUN_TEST_STEP 100 MessagingTestServer CreatePop3Service					c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini CreatePop3Service
       
    32 RUN_TEST_STEP 100 MessagingTestServer CreateSmtpService					c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini CreateSmtpService
       
    33 RUN_TEST_STEP 100 MessagingTestServer CreateRegistry					c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini CreateRegistry
       
    34 RUN_TEST_STEP 100 MessagingTestServer CreatePop3Mtm						c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini CreatePop3Mtm
       
    35 RUN_TEST_STEP 100 MessagingTestServer CreateSmtpMtm						c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini CreateSmtpMtm
       
    36 RUN_TEST_STEP 100 MessagingTestServer GetDefaultSmtpService					c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini GetDefaultSmtpService
       
    37 RUN_TEST_STEP 100 MessagingTestServer SetPop3ServiceParameters			c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini SetPop3ServiceParameters
       
    38 RUN_TEST_STEP 100 MessagingTestServer SetSmtpServiceParameters			c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini SetSmtpServiceParameters
       
    39 
       
    40 //create a pop populate object that downloads 5 lines
       
    41 RUN_TEST_STEP 100 MessagingTestServer CreatePop3MailInfo				c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini CreatePop3MailInfo
       
    42 
       
    43 //create an object containing what we expect the downloaded email to have
       
    44 // 5 lines of body text and a footer message
       
    45 RUN_TEST_STEP 100 MessagingTestServer CreateExpPop3MailInfo				c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini CreateExpPop3MailInfo0
       
    46 
       
    47 //?default settings?
       
    48 RUN_TEST_STEP 100 MessagingTestServer SetDefaultConfiguration			c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini	SetDefaultConfiguration_1
       
    49 
       
    50 // clean out the mail box
       
    51 // connect to the pop server, delete everything and disconnect
       
    52 RUN_TEST_STEP 100 MessagingTestServer ConnectPop3Server   				c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini ConnectPop3Server0
       
    53 RUN_TEST_STEP 100 MessagingTestServer DeleteChildren					c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini DeleteChildren
       
    54 RUN_TEST_STEP 100 MessagingTestServer CheckChildrenCount				c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini CheckChildrenCount0
       
    55 RUN_TEST_STEP 100 MessagingTestServer DisconnectPop3Server				c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini DisconnectPop3Server0
       
    56 // send one message to the mail box, sleep to ensure it gets there, check the sent folder
       
    57 // has one message in it.
       
    58 RUN_TEST_STEP 100 MessagingTestServer CreateSmtpMessageFromEmailFile	c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini	CreateSmtpMessageFromEmailFile
       
    59 RUN_TEST_STEP 100 MessagingTestServer CopyEntry							c:\msgtest\TestFramework\ScriptedTestCases\CreateSendReceivePop3Email.ini CopyEntry
       
    60 RUN_TEST_STEP 100 MessagingTestServer Sleep								c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini Sleep10
       
    61 RUN_TEST_STEP 100 MessagingTestServer CheckChildrenCount				c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini CheckChildrenCount_sent4
       
    62 
       
    63 // connect to pop3 server and partially populate the one message there then disconnect
       
    64 RUN_TEST_STEP 100 MessagingTestServer ConnectPop3Server	   				c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini ConnectPop3Server1
       
    65 RUN_TEST_STEP 100 MessagingTestServer CreateChildrenSelection			c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini	CreateChildrenSelectionPop3
       
    66 RUN_TEST_STEP 100 MessagingTestServer Pop3TopPopulate					c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini Pop3TopPopulate
       
    67 RUN_TEST_STEP 100 MessagingTestServer DisconnectPop3Server				c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini DisconnectPop3Server1
       
    68 
       
    69 // prune the messages under the pop service
       
    70 RUN_TEST_STEP 100 MessagingTestServer CreateChildrenSelection			c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini CreateChildrenSelectionPop3
       
    71 RUN_TEST_STEP 100 MessagingTestServer PruneMessages						c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini PruneMessages
       
    72 
       
    73 // The test:
       
    74 //			connect to pop3 server with one message that has been partially populated then pruned
       
    75 //			partially populate the message
       
    76 //			disconect
       
    77 
       
    78 RUN_TEST_STEP 100 MessagingTestServer EXECUTE_TEST_CASE
       
    79 RUN_TEST_STEP 100 MessagingTestServer ConnectPop3Server	   				c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini ConnectPop3Server1
       
    80 RUN_TEST_STEP 100 MessagingTestServer CreateChildrenSelection			c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini	CreateChildrenSelectionPop3
       
    81 RUN_TEST_STEP 100 MessagingTestServer Pop3TopPopulate					c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini Pop3TopPopulate
       
    82 RUN_TEST_STEP 100 MessagingTestServer DisconnectPop3Server				c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini DisconnectPop3Server1
       
    83 
       
    84 // Expected result:
       
    85 //			message is partially downloaded (footer and some body text).
       
    86 
       
    87 RUN_TEST_STEP 100 MessagingTestServer CHECK_POSTCONDITIONS
       
    88 RUN_TEST_STEP 100 MessagingTestServer CreateChildrenSelection			c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini	CreateChildrenSelectionPop3
       
    89 RUN_TEST_STEP 100 MessagingTestServer CreateChildrenSelection			c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini CreateChildrenSentItems
       
    90 RUN_TEST_STEP 100 MessagingTestServer VerifyEmail						c:\msgtest\TestFramework\ScriptedTestCases\Pop3TopTest23.ini VerifyEmail
       
    91 
       
    92 RUN_TEST_STEP 100 MessagingTestServer END_TEST_CASE