telephonyprotocols/psdagt/TS_PsdAgt/PsdAgtTestLogging.cpp
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // This contains PsdAgt TestCase Test 5.1 - 5.3
       
    15 // 
       
    16 //
       
    17 
       
    18 // EPOC includes
       
    19 #include <e32base.h>
       
    20 #include <in_sock.h>
       
    21 
       
    22 // Test system includes
       
    23 #include "networking/log.h"
       
    24 #include "networking/teststep.h"
       
    25 #include "TestStepPsdAgt.h"
       
    26 #include "TestSuitePsdAgt.h"
       
    27 
       
    28 // RPacketContext
       
    29 #include <etelpckt.h> 
       
    30 
       
    31 // COMMDB Database Undo
       
    32 #include "DbUndo.h"
       
    33 
       
    34 // Class definitions
       
    35 #include "PsdAgtTestLogging.h"
       
    36 
       
    37 
       
    38 // Test case 5.1,  Wait for GetDataVolumeRequest
       
    39 enum TVerdict CPsdAgtTest5_1::doPsdAgtTestStepL( void )
       
    40 	{
       
    41 	TRealAgtNotify agtNotify; 
       
    42 	agtNotify.SetTestCase(501);
       
    43 
       
    44 	ConnectAndWaitForAsyncronousRequestL();
       
    45 	
       
    46 	// GetDataVolumeRequest should only have been called twice
       
    47 	// ie. iStage == 3
       
    48 	TESTL(iStage == 3);
       
    49 
       
    50 	Log(_L("Check LogDataTransferred values in GENCONN.TXT"));
       
    51 
       
    52 	return iTestStepResult;
       
    53 	}
       
    54 
       
    55 
       
    56 void CPsdAgtTest5_1::PsdAgtGetDataVolumeRequest(TUint32 &aSent, TUint32 &aReceived)
       
    57 	{
       
    58 	// Volume request should only be called twice
       
    59 	TEST(iStage == 1 || iStage == 2);
       
    60 
       
    61 	// First time data volume is requested
       
    62 	if(iStage == 1)
       
    63 		{
       
    64 		iStage++;
       
    65 		aSent = 100;     // Sent size
       
    66 		aReceived = 101; // Rcv size
       
    67 
       
    68 		// Unblock ConnectAndWaitForAsyncronousRequest()
       
    69 		CActiveScheduler::Stop();
       
    70 		}
       
    71 	// Second time data volume is requested during the Disconnect
       
    72 	else if(iStage == 2)
       
    73 		{
       
    74 		iStage++;
       
    75 		aSent = 100;     // Sent size
       
    76 		aReceived = 132; // Rcv size
       
    77 		}
       
    78 	}
       
    79 
       
    80 // Test case 5.2,  Wait sufficient time for GetDataVolumeRequest
       
    81 enum TVerdict CPsdAgtTest5_2::doPsdAgtTestStepL( void )
       
    82 	{
       
    83 	TRealAgtNotify agtNotify; 
       
    84 	agtNotify.SetTestCase(502);
       
    85 
       
    86 
       
    87 	ConnectAndWaitForEightySecondsL();
       
    88 
       
    89 	Log(_L("Check LogDataTransferred values in GENCONN.TXT"));
       
    90 
       
    91 	return iTestStepResult;
       
    92 	}
       
    93 
       
    94 
       
    95 void CPsdAgtTest5_2::PsdAgtGetDataVolumeRequest(TUint32&, TUint32&)
       
    96 	{
       
    97 	// should be asking the TSY, not NIFMAN
       
    98 	TEST(EFalse);
       
    99 	}
       
   100 
       
   101 // Test case 5.3,  Wait sufficient time for GetDataVolumeRequest
       
   102 enum TVerdict CPsdAgtTest5_3::doPsdAgtTestStepL( void )
       
   103 	{
       
   104 	TRealAgtNotify agtNotify; 
       
   105 	agtNotify.SetTestCase(503);
       
   106 
       
   107 	ConnectAndWaitForEightySecondsL();
       
   108 
       
   109 	Log(_L("Check LogDataTransferred values in GENCONN.TXT"));
       
   110 
       
   111 	return iTestStepResult;
       
   112 	}
       
   113 
       
   114 
       
   115 void CPsdAgtTest5_3::PsdAgtGetDataVolumeRequest(TUint32&, TUint32&)
       
   116 	{
       
   117 	// should be asking the TSY, not NIFMAN
       
   118 	TEST(EFalse);
       
   119 	}
       
   120