telephonyserverplugins/common_tsy/test/component/src/cctsymmsfu.cpp
changeset 0 3553901f7fa8
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 // The TEFUnit test suite for MMS in the Common TSY.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file 
       
    20 */
       
    21 
       
    22 #include "cctsymmsfu.h"
       
    23 #include <etel.h>
       
    24 #include <etelmm.h>
       
    25 #include <et_clsvr.h>
       
    26 #include <ctsy/mmtsy_names.h>
       
    27 #include <ctsy/serviceapi/mmtsy_ipcdefs.h>
       
    28 #include "tmockltsydata.h"
       
    29 #include <ctsy/serviceapi/gsmerror.h>
       
    30 
       
    31 CTestSuite* CCTsyMMSFU::CreateSuiteL(const TDesC& aName)
       
    32 	{
       
    33 	SUB_SUITE;
       
    34 
       
    35 	ADD_TEST_STEP_ISO_CPP(CCTsyMMSFU, TestGetMmsConfig0001L);
       
    36 	ADD_TEST_STEP_ISO_CPP(CCTsyMMSFU, TestNotifyMmsConfig0001L);
       
    37 	ADD_TEST_STEP_ISO_CPP(CCTsyMMSFU, TestNotifyMmsUpdate0001L);
       
    38 	ADD_TEST_STEP_ISO_CPP(CCTsyMMSFU, TestSetMmsUserConnParams0001L);
       
    39 	ADD_TEST_STEP_ISO_CPP(CCTsyMMSFU, TestSetMmsUserPreferences0001L);
       
    40 
       
    41 	END_SUITE;
       
    42 	}
       
    43 
       
    44 
       
    45 //
       
    46 // Actual test cases
       
    47 //
       
    48 
       
    49 
       
    50 /**
       
    51 @SYMTestCaseID BA-CTSY-MMS-MGMC-0001
       
    52 @SYMComponent  telephony_ctsy
       
    53 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::GetMmsConfig
       
    54 @SYMTestPriority High
       
    55 @SYMTestActions Invokes RMobilePhone::GetMmsConfig
       
    56 @SYMTestExpectedResults Pass
       
    57 @SYMTestType CT
       
    58 */
       
    59 void CCTsyMMSFU::TestGetMmsConfig0001L()
       
    60 	{
       
    61 
       
    62 	OpenEtelServerL(EUseExtendedError);
       
    63 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
    64 	OpenPhoneL();
       
    65 
       
    66 	RBuf8 data;
       
    67 	CleanupClosePushL(data);
       
    68 
       
    69 	// Test API is not supported
       
    70 	TRequestStatus reqStatus;
       
    71 	RMobilePhone::TMmsConnParams type = RMobilePhone::EUserPreferences;
       
    72 	iPhone.GetMmsConfig(reqStatus, type, data);
       
    73 	User::WaitForRequest(reqStatus);
       
    74 	ASSERT_EQUALS(KErrNotSupported, reqStatus.Int())	
       
    75 
       
    76 	AssertMockLtsyStatusL();
       
    77 	CleanupStack::PopAndDestroy(2, this); // data, this
       
    78 	
       
    79 	}
       
    80 
       
    81 
       
    82 /**
       
    83 @SYMTestCaseID BA-CTSY-MMS-MNMCPC-0001
       
    84 @SYMComponent  telephony_ctsy
       
    85 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::NotifyMmsConfig
       
    86 @SYMTestPriority High
       
    87 @SYMTestActions Invokes RMobilePhone::NotifyMmsConfig
       
    88 @SYMTestExpectedResults Pass
       
    89 @SYMTestType CT
       
    90 */
       
    91 void CCTsyMMSFU::TestNotifyMmsConfig0001L()
       
    92 	{
       
    93 
       
    94 	OpenEtelServerL(EUseExtendedError);
       
    95 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
    96 	OpenPhoneL();
       
    97 
       
    98 	RBuf8 data;
       
    99 	CleanupClosePushL(data);
       
   100 	
       
   101 	// Test API is not supported
       
   102 	TRequestStatus reqStatus;
       
   103 	RMobilePhone::TMmsConnParams type = RMobilePhone::EUserPreferences;
       
   104 	iPhone.NotifyMmsConfig(reqStatus, type, data);
       
   105 	User::WaitForRequest(reqStatus);
       
   106 	ASSERT_EQUALS(KErrNotSupported, reqStatus.Int())
       
   107 
       
   108 
       
   109 	AssertMockLtsyStatusL();
       
   110 	CleanupStack::PopAndDestroy(2, this); // data, this	
       
   111 	}
       
   112 
       
   113 
       
   114 /**
       
   115 @SYMTestCaseID BA-CTSY-MMS-MNMU-0001
       
   116 @SYMComponent  telephony_ctsy
       
   117 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::NotifyMmsUpdate
       
   118 @SYMTestPriority High
       
   119 @SYMTestActions Invokes RMobilePhone::NotifyMmsUpdate
       
   120 @SYMTestExpectedResults Pass
       
   121 @SYMTestType CT
       
   122 */
       
   123 void CCTsyMMSFU::TestNotifyMmsUpdate0001L()
       
   124 	{
       
   125 
       
   126 	OpenEtelServerL(EUseExtendedError);
       
   127 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   128 	OpenPhoneL();
       
   129 
       
   130 	RBuf8 data;
       
   131 	CleanupClosePushL(data);
       
   132 
       
   133 	// Test API is not supported
       
   134 	TRequestStatus reqStatus;
       
   135 	iPhone.NotifyMmsUpdate(reqStatus, data);
       
   136 	User::WaitForRequest(reqStatus);
       
   137 	ASSERT_EQUALS(KErrNotSupported, reqStatus.Int())	
       
   138 
       
   139 	AssertMockLtsyStatusL();
       
   140 	CleanupStack::PopAndDestroy(2, this); // data, this
       
   141 	
       
   142 	}
       
   143 
       
   144 
       
   145 /**
       
   146 @SYMTestCaseID BA-CTSY-MMS-MSMUCP-0001
       
   147 @SYMComponent  telephony_ctsy
       
   148 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::SetMmsUserConnParams
       
   149 @SYMTestPriority High
       
   150 @SYMTestActions Invokes RMobilePhone::SetMmsUserConnParams
       
   151 @SYMTestExpectedResults Pass
       
   152 @SYMTestType CT
       
   153 */
       
   154 void CCTsyMMSFU::TestSetMmsUserConnParams0001L()
       
   155 	{
       
   156 
       
   157 	OpenEtelServerL(EUseExtendedError);
       
   158 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   159 	OpenPhoneL();
       
   160 
       
   161 	RBuf8 data;
       
   162 	CleanupClosePushL(data);
       
   163 
       
   164 	// Test API is not supported
       
   165 	TRequestStatus reqStatus;
       
   166 	iPhone.SetMmsUserConnParams(reqStatus, data);
       
   167 	User::WaitForRequest(reqStatus);
       
   168 	ASSERT_EQUALS(KErrNotSupported, reqStatus.Int())	
       
   169 
       
   170 	AssertMockLtsyStatusL();
       
   171 	CleanupStack::PopAndDestroy(2, this); // data, this
       
   172 	
       
   173 	}
       
   174 
       
   175 
       
   176 /**
       
   177 @SYMTestCaseID BA-CTSY-MMS-MSMUP-0001
       
   178 @SYMComponent  telephony_ctsy
       
   179 @SYMTestCaseDesc Test support in CTSY for RMobilePhone::SetMmsUserPreferences
       
   180 @SYMTestPriority High
       
   181 @SYMTestActions Invokes RMobilePhone::SetMmsUserPreferences
       
   182 @SYMTestExpectedResults Pass
       
   183 @SYMTestType CT
       
   184 */
       
   185 void CCTsyMMSFU::TestSetMmsUserPreferences0001L()
       
   186 	{
       
   187 
       
   188 	OpenEtelServerL(EUseExtendedError);
       
   189 	CleanupStack::PushL(TCleanupItem(Cleanup,this));
       
   190 	OpenPhoneL();
       
   191 
       
   192 	RBuf8 data;
       
   193 	CleanupClosePushL(data);
       
   194 
       
   195 	// Test API is not supported
       
   196 	TRequestStatus reqStatus;
       
   197 	iPhone.SetMmsUserPreferences(reqStatus, data);
       
   198 	User::WaitForRequest(reqStatus);
       
   199 	ASSERT_EQUALS(KErrNotSupported, reqStatus.Int())	
       
   200 
       
   201 	AssertMockLtsyStatusL();
       
   202 	CleanupStack::PopAndDestroy(2, this); // data, this
       
   203 	
       
   204 	}
       
   205 
       
   206 
       
   207