telephonyprotocols/csdagt/TS_CsdAgt/CsdAgtTestStateMachineInit.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 CsdAgt TestCase Test 2.1 - 2.15
       
    15 // 
       
    16 //
       
    17 
       
    18 // EPOC includes
       
    19 #include <e32base.h>
       
    20 #include <in_sock.h>
       
    21 #include <dummyetel.h> // include here to avoid picking up the real etel.h
       
    22 #include <etelmm.h>
       
    23 
       
    24 // Test system includes
       
    25 #include "log.h"
       
    26 #include "teststep.h"
       
    27 #include "TestStepCsdAgt.h"
       
    28 #include "TestSuiteCsdAgt.h"
       
    29 
       
    30 // COMMDB Database Undo
       
    31 #include "DbUndo.h"
       
    32 
       
    33 // EFinishedDialling
       
    34 #include <csdprog.h>
       
    35 
       
    36 // Class definitions
       
    37 #include "CsdAgtTestStateMachineInit.h"
       
    38 
       
    39 /**
       
    40  * Test case 2.1 CSD connect when ETel server LoadPhoneModule() fails
       
    41  *
       
    42  */
       
    43 enum TVerdict CCsdAgtTest2_1::doCsdAgtTestStepL( void )
       
    44 	{
       
    45 	TRealAgtNotify AgtNotify;
       
    46 
       
    47 	AgtNotify.SetTestCase(10201);
       
    48 	SetGSMModeL(AgtNotify);
       
    49 
       
    50 	ConnectExpectErrorL(KErrGeneral,ECsdFinishedDialling);
       
    51 
       
    52 	return iTestStepResult;
       
    53 	}
       
    54 
       
    55 /**
       
    56  * Test case 2.2 CSD connect when ETel server EnumeratePhones() fails
       
    57  *
       
    58  */
       
    59 enum TVerdict CCsdAgtTest2_2::doCsdAgtTestStepL( void )
       
    60 	{
       
    61 	TRealAgtNotify AgtNotify;
       
    62 
       
    63 	AgtNotify.SetTestCase(10202);
       
    64 	SetGSMModeL(AgtNotify);
       
    65 
       
    66 	ConnectExpectErrorL(KErrNotFound,ECsdFinishedDialling);
       
    67 
       
    68 	return iTestStepResult;
       
    69 	}
       
    70 
       
    71 /**
       
    72  * Test case 2.3 CSD connect when ETel server GetTsyName() fails
       
    73  *
       
    74  */
       
    75 enum TVerdict CCsdAgtTest2_3::doCsdAgtTestStepL( void )
       
    76 	{
       
    77 	TRealAgtNotify AgtNotify;
       
    78 
       
    79 	AgtNotify.SetTestCase(10203);
       
    80 	SetGSMModeL(AgtNotify);
       
    81 
       
    82 	ConnectExpectErrorL(KErrGeneral,ECsdFinishedDialling);
       
    83 
       
    84 	return iTestStepResult;
       
    85 	}
       
    86 
       
    87 /**
       
    88  * Test case 2.4, CSD connect when ETel server GetTsyName() returns different name
       
    89  *
       
    90  */
       
    91 enum TVerdict CCsdAgtTest2_4::doCsdAgtTestStepL( void )
       
    92 	{
       
    93 	TRealAgtNotify AgtNotify;
       
    94 
       
    95 	AgtNotify.SetTestCase(10204);
       
    96 	SetGSMModeL(AgtNotify);
       
    97 
       
    98 	ConnectExpectErrorL(KErrNotFound,ECsdFinishedDialling);
       
    99 
       
   100 	return iTestStepResult;
       
   101 	}
       
   102 
       
   103 /**
       
   104  * Test case 2.5 CSD connect when ETel server GetTsyName() contains . (dot)
       
   105  *
       
   106  */
       
   107 enum TVerdict CCsdAgtTest2_5::doCsdAgtTestStepL( void )
       
   108 	{
       
   109 	TRealAgtNotify AgtNotify;
       
   110 
       
   111 	AgtNotify.SetTestCase(10205);
       
   112 	SetGSMModeL(AgtNotify);
       
   113 
       
   114 	ConnectExpectErrorL(KErrNotFound,ECsdFinishedDialling);
       
   115 
       
   116 	return iTestStepResult;
       
   117 	}
       
   118 
       
   119 /**
       
   120  * Test case 2.6 CSD connect when ETel server GetPhoneInfo() fails
       
   121  *
       
   122  */
       
   123 enum TVerdict CCsdAgtTest2_6::doCsdAgtTestStepL( void )
       
   124 	{
       
   125 	TRealAgtNotify AgtNotify;
       
   126 
       
   127 	AgtNotify.SetTestCase(10206);
       
   128 	SetGSMModeL(AgtNotify);
       
   129 
       
   130 	ConnectExpectErrorL(KErrNotSupported,ECsdFinishedDialling);
       
   131 
       
   132 	return iTestStepResult;
       
   133 	}
       
   134 
       
   135 /**
       
   136  * Test case 2.7 CSD connect when ETel server OpenNewCall() fails
       
   137  *
       
   138  */
       
   139 enum TVerdict CCsdAgtTest2_7::doCsdAgtTestStepL( void )
       
   140 	{
       
   141 	TRealAgtNotify AgtNotify;
       
   142 
       
   143 	AgtNotify.SetTestCase(10207);
       
   144 	SetGSMModeL(AgtNotify);
       
   145 
       
   146 	ConnectExpectErrorL(KErrGeneral,ECsdFinishedDialling);
       
   147 
       
   148 	return iTestStepResult;
       
   149 	}
       
   150 
       
   151 /**
       
   152  * Test case 2.8 CSD connect when ETel server GetMobileDataCallCaps() fails
       
   153  *
       
   154  */
       
   155 enum TVerdict CCsdAgtTest2_8::doCsdAgtTestStepL( void )
       
   156 	{
       
   157 	TRealAgtNotify AgtNotify;
       
   158 
       
   159 	AgtNotify.SetTestCase(10208);
       
   160 	SetGSMModeL(AgtNotify);
       
   161 
       
   162 	ConnectExpectErrorL(KErrGeneral,ECsdFinishedDialling);
       
   163 
       
   164 	return iTestStepResult;
       
   165 	}
       
   166 
       
   167 /**
       
   168  * Test case 2.9 CSD connect when ETel server Dial() fails
       
   169  *
       
   170  */
       
   171 enum TVerdict CCsdAgtTest2_9::doCsdAgtTestStepL( void )
       
   172 	{
       
   173 	TRealAgtNotify AgtNotify;
       
   174 
       
   175 	AgtNotify.SetTestCase(10209);
       
   176 	SetGSMModeL(AgtNotify);
       
   177 
       
   178 	ConnectExpectErrorL(KErrGeneral,ECsdFinishedDialling);
       
   179 
       
   180 	return iTestStepResult;
       
   181 	}
       
   182 
       
   183 /**
       
   184  * Test case 2.10 CSD connect when ETel server Dial() fails for HSCSD call
       
   185  *
       
   186  */
       
   187 enum TVerdict CCsdAgtTest2_10::doCsdAgtTestStepL( void )
       
   188 	{
       
   189 	TRealAgtNotify AgtNotify;
       
   190 
       
   191 	AgtNotify.SetTestCase(10210);
       
   192 	SetGSMModeL(AgtNotify);
       
   193 
       
   194 	ConnectExpectErrorL(KErrNotSupported,ECsdFinishedDialling);
       
   195 
       
   196 	return iTestStepResult;
       
   197 	}
       
   198 
       
   199 /**
       
   200  * Test case 2.11 CSD connect when ETel server LoanDataPort() fails
       
   201  *
       
   202  */
       
   203 enum TVerdict CCsdAgtTest2_11::doCsdAgtTestStepL( void )
       
   204 	{
       
   205 	TRealAgtNotify AgtNotify;
       
   206 
       
   207 	AgtNotify.SetTestCase(10211);
       
   208 	SetGSMModeL(AgtNotify);
       
   209 
       
   210 	ConnectExpectErrorL(KErrGeneral,ECsdScannedScript);
       
   211 
       
   212 	return iTestStepResult;
       
   213 	}
       
   214 
       
   215 /**
       
   216  * Test case 2.12 CSD connect when ETel server RecoverDataPort() fails
       
   217  *
       
   218  */
       
   219 enum TVerdict CCsdAgtTest2_12::doCsdAgtTestStepL( void )
       
   220 	{
       
   221 	TRealAgtNotify AgtNotify;
       
   222 
       
   223 	AgtNotify.SetTestCase(10212);
       
   224 	SetGSMModeL(AgtNotify);
       
   225 
       
   226 	NormalConnectL();
       
   227 
       
   228 	return iTestStepResult;
       
   229 	}
       
   230 
       
   231 /**
       
   232  * Test case 2.13 CSD connect when ETel server HangUp() fails
       
   233  *
       
   234  */
       
   235 enum TVerdict CCsdAgtTest2_13::doCsdAgtTestStepL( void )
       
   236 	{
       
   237 	TRealAgtNotify AgtNotify;
       
   238 
       
   239 	AgtNotify.SetTestCase(10213);
       
   240 	SetGSMModeL(AgtNotify);
       
   241 
       
   242 	NormalConnectL();
       
   243 
       
   244 	return iTestStepResult;
       
   245 	}
       
   246 
       
   247 /**
       
   248  * Test case 2.14 CSD connect when ETel server HangUp() succeeds
       
   249  *
       
   250  */
       
   251 enum TVerdict CCsdAgtTest2_14::doCsdAgtTestStepL( void )
       
   252 	{
       
   253 	TRealAgtNotify AgtNotify;
       
   254 
       
   255 	AgtNotify.SetTestCase(10214);
       
   256 	SetGSMModeL(AgtNotify);
       
   257 
       
   258 	NormalConnectL();
       
   259 
       
   260 	return iTestStepResult;
       
   261 	}
       
   262 
       
   263 
       
   264 /**
       
   265  * Test case 2.15 CSD connect when a call is already in progress
       
   266  *
       
   267  */
       
   268 enum TVerdict CCsdAgtTest2_15::doCsdAgtTestStepL( void )
       
   269 	{
       
   270 	TRealAgtNotify AgtNotify;
       
   271 
       
   272 	AgtNotify.SetTestCase(10215);
       
   273 	SetGSMModeL(AgtNotify);
       
   274 
       
   275 	ConnectExpectErrorL(KErrAccessDenied,ECsdFinishedDialling);
       
   276 
       
   277 	return iTestStepResult;
       
   278 	}