telephonyserverplugins/common_tsy/test/integration/src/cctsyintegrationtestfax.cpp
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2007-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 // Test step definitions for the Fax functional unit.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @internalTechnology
       
    20 */
       
    21 
       
    22 #include "cctsyintegrationtestfax.h"
       
    23 
       
    24 #include "cctsyinidata.h"
       
    25 
       
    26 
       
    27 
       
    28 	
       
    29 CCTSYIntegrationTestFaxBase::CCTSYIntegrationTestFaxBase(CEtelSessionMgr& aEtelSessionMgr)
       
    30 	: CCTSYIntegrationTestSuiteStepBase(aEtelSessionMgr)
       
    31 /**
       
    32  * Constructor
       
    33  */
       
    34 	{
       
    35 	}
       
    36 
       
    37 CCTSYIntegrationTestFaxBase::~CCTSYIntegrationTestFaxBase()
       
    38 /*
       
    39  * Destructor
       
    40  */
       
    41 	{
       
    42 	}
       
    43 	
       
    44 
       
    45 CCTSYIntegrationTestFax0001::CCTSYIntegrationTestFax0001(CEtelSessionMgr& aEtelSessionMgr)
       
    46 	: CCTSYIntegrationTestFaxBase(aEtelSessionMgr)
       
    47 /**
       
    48  * Constructor.
       
    49  */
       
    50 	{
       
    51 	SetTestStepName(CCTSYIntegrationTestFax0001::GetTestStepName());
       
    52 	}
       
    53 
       
    54 CCTSYIntegrationTestFax0001::~CCTSYIntegrationTestFax0001()
       
    55 /**
       
    56  * Destructor.
       
    57  */
       
    58 	{
       
    59 	}
       
    60 
       
    61 TVerdict CCTSYIntegrationTestFax0001::doTestStepL()
       
    62 /**
       
    63  * @SYMTestCaseID BA-CTSY-INT-FAX-0001
       
    64  * @SYMFssID BA/CTSY/FAX-0001
       
    65  * @SYMTestCaseDesc MO fax call to fax device
       
    66  * @SYMTestPriority High
       
    67  * @SYMTestActions 
       
    68  * @SYMTestExpectedResults Pass - Fax is successfully sent
       
    69  * @SYMTestType CIT
       
    70  * @SYMTestCaseDependencies live/manual
       
    71  *
       
    72  * Reason for test: Verify MO fax call succeeds.
       
    73  *
       
    74  * @return - TVerdict code
       
    75  */
       
    76 	{
       
    77 
       
    78 	//
       
    79 	// SET UP
       
    80 	//
       
    81 	
       
    82 	RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);	
       
    83 
       
    84 	// Ensure phone supports KCapsFax.
       
    85 	RMobilePhone::TCaps mobilePhoneCaps;
       
    86 	
       
    87 	CHECK_TRUE_L(mobilePhone.GetCaps(mobilePhoneCaps) == KErrNone, _L("RMobilePhone::GetCaps"));
       
    88 	TUint32 expectedMobilePhoneCaps = RLine::KCapsFax;
       
    89 	CHECK_BITS_SET_L(mobilePhoneCaps.iFlags, expectedMobilePhoneCaps, KNoWantedBits, _L("RMobilePhone::GetCaps returned wrong dynamic caps"));	
       
    90 		
       
    91 	// Get Fax Line
       
    92 	RMobileLine& faxLine = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KFaxLine);
       
    93 	
       
    94 	//
       
    95 	// SET UP END
       
    96 	//
       
    97 	
       
    98 	StartTest();
       
    99 	
       
   100 	//
       
   101 	// TEST START
       
   102 	//
       
   103 	
       
   104 	// Try to get Fax.	 
       
   105 	TRAPD (err, RFax& mainFax = iEtelSessionMgr.GetFaxL (KMainServer, KMainPhone, KFaxLine, KCall1, KMainFax ));
       
   106 	
       
   107 	ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10051);
       
   108 	ASSERT_EQUALS(KErrNone, err, _L("GetFaxL() problem opening "));
       
   109 	
       
   110 	// Use te_fax test	
       
   111 	
       
   112 	//
       
   113 	// TEST END
       
   114 	//
       
   115 
       
   116 	StartCleanup();	
       
   117 	
       
   118 	return TestStepResult();
       
   119 	}
       
   120 
       
   121 TPtrC CCTSYIntegrationTestFax0001::GetTestStepName()
       
   122 /**
       
   123  * @return The test step name.
       
   124  */
       
   125 	{
       
   126 	return _L("CCTSYIntegrationTestFax0001");
       
   127 	}
       
   128 
       
   129 
       
   130 
       
   131 CCTSYIntegrationTestFax0002::CCTSYIntegrationTestFax0002(CEtelSessionMgr& aEtelSessionMgr)
       
   132 	: CCTSYIntegrationTestFaxBase(aEtelSessionMgr)
       
   133 /**
       
   134  * Constructor.
       
   135  */
       
   136 	{
       
   137 	SetTestStepName(CCTSYIntegrationTestFax0002::GetTestStepName());
       
   138 	}
       
   139 
       
   140 CCTSYIntegrationTestFax0002::~CCTSYIntegrationTestFax0002()
       
   141 /**
       
   142  * Destructor.
       
   143  */
       
   144 	{
       
   145 	}
       
   146 
       
   147 TVerdict CCTSYIntegrationTestFax0002::doTestStepL()
       
   148 /**
       
   149  * @SYMTestCaseID BA-CTSY-INT-FAX-0002
       
   150  * @SYMFssID BA/CTSY/FAX-0002
       
   151  * @SYMTestCaseDesc MT fax call from fax device
       
   152  * @SYMTestPriority High
       
   153  * @SYMTestActions 
       
   154  * @SYMTestExpectedResults Pass - Fax is successfully received
       
   155  * @SYMTestType CIT
       
   156  * @SYMTestCaseDependencies live/manual
       
   157  *
       
   158  * Reason for test: Verify MT fax call succeeds.
       
   159  *
       
   160  * @return - TVerdict code
       
   161  */
       
   162 	{
       
   163 	//
       
   164 	// SET UP
       
   165 	//
       
   166 	
       
   167 	RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone);	
       
   168 
       
   169 	// Ensure phone supports KCapsFax.
       
   170 	RMobilePhone::TCaps mobilePhoneCaps;
       
   171 	
       
   172 	CHECK_TRUE_L(mobilePhone.GetCaps(mobilePhoneCaps) == KErrNone, _L("RMobilePhone::GetCaps"));
       
   173 	TUint32 expectedMobilePhoneCaps = RLine::KCapsFax;
       
   174 	CHECK_BITS_SET_L(mobilePhoneCaps.iFlags, expectedMobilePhoneCaps, KNoWantedBits, _L("RMobilePhone::GetCaps returned wrong dynamic caps"));	
       
   175 		
       
   176 	// Get Fax Line
       
   177 	RMobileLine& faxLine = iEtelSessionMgr.GetLineL(KMainServer, KMainPhone, KFaxLine);
       
   178 	
       
   179 	//
       
   180 	// SET UP END
       
   181 	//
       
   182 	
       
   183 	StartTest();
       
   184 	
       
   185 	//
       
   186 	// TEST START
       
   187 	//
       
   188 	
       
   189 	// Try to get Fax.	 
       
   190 	TRAPD (err, RFax& mainFax = iEtelSessionMgr.GetFaxL (KMainServer, KMainPhone, KFaxLine, KCall1, KMainFax ));
       
   191 	
       
   192 	ERR_PRINTF2(_L("<font color=Orange>$CTSYKnownFailure: defect id = %d</font>"), 10051);
       
   193 	ASSERT_EQUALS(KErrNone, err, _L("GetFaxL() problem opening "));			
       
   194 
       
   195 	// Use te_fax test
       
   196 	
       
   197 	//
       
   198 	// TEST END
       
   199 	//
       
   200 
       
   201 	StartCleanup();	
       
   202 	
       
   203 	return TestStepResult();
       
   204 	}
       
   205 
       
   206 TPtrC CCTSYIntegrationTestFax0002::GetTestStepName()
       
   207 /**
       
   208  * @return The test step name.
       
   209  */
       
   210 	{
       
   211 	return _L("CCTSYIntegrationTestFax0002");
       
   212 	}
       
   213 
       
   214 
       
   215