telephonyserverplugins/simatktsy/tests/inc/ccsatsendsmsfu.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2008-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 // functional unit of the SAT.
       
    15 //
       
    16 
       
    17 
       
    18 
       
    19 /**
       
    20  @file The TEFUnit header file which tests the SendSMS
       
    21 */
       
    22 
       
    23 #ifndef CCSATSENDSMSFU_H
       
    24 #define CCSATSENDSMSFU_H
       
    25 
       
    26 #include <test/tefunit.h>
       
    27 
       
    28 #include <etelmm.h>
       
    29 #include <etelmmcs.h>
       
    30 
       
    31 #include "ccsatcomponenttestbase.h"
       
    32 
       
    33 class CCSatSendSMSFU : public CCSatComponentTestBase
       
    34 	{
       
    35 public:
       
    36 	// Create a suite of all the tests
       
    37 	static CTestSuite* CreateSuiteL(const TDesC& aName);
       
    38 
       
    39 public:
       
    40 	// Individual test steps
       
    41 
       
    42 	void TestNotifySendSmPCmd0001L();
       
    43 	void TestNotifySendSmPCmd0002L();
       
    44 	void TestNotifySendSmPCmd0004L();
       
    45 
       
    46 private:
       
    47 	// comments in the below enum refers to 3GPP TS 31.124 V7.4.0 (2008-06) 
       
    48 	enum TSendSmTC {
       
    49 	// clause 27.22.4.10.1 SEND SHORT MESSAGE (normal), sequence 1.1
       
    50 	ETestSequence11,        
       
    51 	// clause 27.22.4.10.1 SEND SHORT MESSAGE (normal), sequence 1.2
       
    52 	ETestSequence12,        
       
    53 	// clause 27.22.4.10.1 SEND SHORT MESSAGE (normal), sequence 1.3
       
    54 	ETestSequence13,        
       
    55 	// clause 27.22.4.10.1 SEND SHORT MESSAGE (normal), sequence 1.4
       
    56 	ETestSequence14,        
       
    57 	// clause 27.22.4.10.1 SEND SHORT MESSAGE (normal), sequence 1.5
       
    58 	ETestSequence15,        
       
    59 	// clause 27.22.4.10.1 SEND SHORT MESSAGE (normal), sequence 1.6
       
    60 	ETestSequence16,        
       
    61 	// clause 27.22.4.10.1 SEND SHORT MESSAGE (normal), sequence 1.7
       
    62 	ETestSequence17,        
       
    63 	// clause 27.22.4.10.1 SEND SHORT MESSAGE (normal), sequence 1.8
       
    64 	ETestSequence18,        
       
    65 	// clause 27.22.4.10.3 SEND SHORT MESSAGE (icon support), sequence 3.1A
       
    66 	ETestSequence31A,  
       
    67 	// clause 27.22.4.10.3 SEND SHORT MESSAGE (icon support), sequence 3.1B
       
    68 	ETestSequence31B,  
       
    69 	// clause 27.22.4.10.3 SEND SHORT MESSAGE (icon support), sequence 3.2A
       
    70 	ETestSequence32A,  
       
    71 	// clause 27.22.4.10.3 SEND SHORT MESSAGE (icon support), sequence 3.2B
       
    72 	ETestSequence32B,  
       
    73 	// clause 27.22.4.10.4 SEND SHORT MESSAGE (Support of Text Attribute)
       
    74 	//ETestSequence41, 
       
    75 	// run test with address TLV missing all data after the tag  
       
    76 	ETestMissingAddressType,
       
    77 	// run test with address TLV missing a dialling number  
       
    78 	ETestMissingDiallingNumber,
       
    79 	// run test with "relative" TP-VPF value set in the TPDU header
       
    80 	ETestRelativeVPF,
       
    81 	ETestRelativeVPFPacked,
       
    82 	// run test with "enchanced" TP-VPF value set in the TPDU header
       
    83 	ETestEnchancedVPF,
       
    84 	ETestEnchancedVPFPacked,
       
    85 	// run test with "absolute" TP-VPF value set the TPDU header
       
    86 	ETestAbsoluteVPF,
       
    87 	ETestAbsoluteVPFPacked,
       
    88 	// run test using SMS-COMMAND TPDU instead of SMS-SUBMIT one
       
    89 	ETestSmsCommand,
       
    90 	// run test with 8-bit coded "SMS-SUBMIT" TPDU having too big value in TP-UDL
       
    91 	ETestTooBigSmsSubmit8bit,
       
    92 	// run test with GSM coded "SMS-SUBMIT" TPDU having too big value in TP-UDL
       
    93 	ETestTooBigSmsSubmit7bit,
       
    94 	// run test with packed 8-bit coded "SMS-SUBMIT" TPDU having too big value in TP-UDL
       
    95 	ETestTooBigSmsSubmit8bitPacked,
       
    96 	// run test with packed GSM coded "SMS-SUBMIT" TPDU having too big value in TP-UDL
       
    97 	ETestTooBigSmsSubmit7bitPacked,
       
    98 	// run test with "SMS-COMMAND" TPDU having a too big value in TP-CDL
       
    99 	ETestTooBigSmsCommand,
       
   100 	// run test with missing SMS TPDU
       
   101 	ETestMissingSmsTpdu,
       
   102 	// test unsolicted event 
       
   103 	ETestUnsolictedCompletion
       
   104 	};
       
   105 
       
   106 	void DoPositiveNotifySendSmPCmdTestL(TSendSmTC aTC);
       
   107 	void DoNegativeNotifySendSmPCmdTestL(TSendSmTC aTC);
       
   108 	void DoTestTerminalResponseL();
       
   109 
       
   110 	void MockPrimeSendSmPCmdL(TTpdu& aTpdu, TSendSmTC aTC, TInt aResultCode = KErrNone);
       
   111 	void MockPrimeSendSmTerminalResponseL(TSendSmTC aTC);	
       
   112 	void MockPrimeSendSmTerminalResponseL(TSendSmTC aTC, const RSat::TSendSmRspV1& aRsp, TInt aResultCode = KErrNone);
       
   113 	void MockCompleteSendSmPCmdL(TTpdu& aTpdu, TSendSmTC aTC, TInt aResultCode = KErrNone);
       
   114 
       
   115 	static void CreateSmsSubmitTpdu(TTpdu& aTpdu,TSendSmTC aTC);
       
   116 	static void CreateSmsCommandTpdu(TTpdu& aTpdu);
       
   117 	static void CreateCorruptedSmsTpdu(TTpdu& aTpdu, TSendSmTC aTC);
       
   118 	static void CreateSmsTpdu(TTpdu& aTpdu, TSendSmTC aTC);
       
   119 	static const TDesC8& CreateSendSmTlv(TTlvBase& aTlv, const TTpdu& aTpdu, TSendSmTC aTC);
       
   120 	static const TDesC8& CreateSendSmTerminalResponseTlv(TTlvBase& aTlv,
       
   121 										TUint8 aCommandQualifier, const RSat::TSendSmRspV1& aRsp);
       
   122 
       
   123 	static TBool PackingIsUsed(TSendSmTC aTC);
       
   124 	static const TDesC8& ExpectedTpdu(TSendSmTC aTC);
       
   125 	static TUint8 ValidityPeriodFormat(TSendSmTC aTC);
       
   126 	static const TDesC8& DestinationAddress(TSendSmTC aTC);
       
   127 	static TUint8 DataCodingScheme(TSendSmTC aTC);
       
   128 	static TUint8 UserDataLength(TSendSmTC aTC);
       
   129 	static const TDesC8& UserData(TSendSmTC aTC);
       
   130 	static TUint8 CommandQualifier(TSendSmTC aTC);
       
   131 	static TBool AlphaIdIsUsed(TSendSmTC aTC);
       
   132 	static const TDesC8& AlphaId(TSendSmTC aTC);
       
   133 	static const TDesC& ExpectedAlphaId(TSendSmTC aTC);
       
   134 	static RSat::TAlphaIdStatus ExpectedAlphaIdStatus(TSendSmTC aTC);
       
   135 	static TBool CompleteAddressIsUsed(TSendSmTC aTC);
       
   136 	static RSat::TNumberingPlan ExpectedNumberPlan(TSendSmTC aTC);
       
   137 	static RSat::TTypeOfNumber ExpectedTypeOfNumber(TSendSmTC aTC);	
       
   138 	static TBool IsIconRelatedTC(TSendSmTC aTC);
       
   139 	static TUint8 IconTlvTag(TSendSmTC aTC);
       
   140 	static TUint8 IconQualifier(TSendSmTC aTC);
       
   141 	static RSat::TIconQualifier ExpectedIconQualifier(TSendSmTC aTC);	
       
   142 	static void FillResponse(RSat::TSendSmRspV1& aRsp,TSendSmTC aTC);
       
   143 
       
   144 	}; // class CCSatSendSMSFU
       
   145 
       
   146 #endif // CCSATSENDSMSFU_H
       
   147