24
|
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 AirTimeDuration in the Common TSY.
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
*/
|
|
21 |
|
|
22 |
#include "cctsyairtimedurationfu.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* CCTsyAirTimeDurationFU::CreateSuiteL(const TDesC& aName)
|
|
32 |
{
|
|
33 |
SUB_SUITE;
|
|
34 |
|
|
35 |
ADD_TEST_STEP_ISO_CPP(CCTsyAirTimeDurationFU, TestGetAirTimeDuration0001L);
|
|
36 |
ADD_TEST_STEP_ISO_CPP(CCTsyAirTimeDurationFU, TestNotifyAirTimeDurationChange0001L);
|
|
37 |
|
|
38 |
END_SUITE;
|
|
39 |
}
|
|
40 |
|
|
41 |
|
|
42 |
//
|
|
43 |
// Actual test cases
|
|
44 |
//
|
|
45 |
|
|
46 |
|
|
47 |
/**
|
|
48 |
@SYMTestCaseID BA-CTSY-ATD-MGATD-0001
|
|
49 |
@SYMComponent telephony_ctsy
|
|
50 |
@SYMTestCaseDesc Test support in CTSY for RMobilePhone::GetAirTimeDuration
|
|
51 |
@SYMTestPriority High
|
|
52 |
@SYMTestActions Invokes RMobilePhone::GetAirTimeDuration
|
|
53 |
@SYMTestExpectedResults Pass
|
|
54 |
@SYMTestType CT
|
|
55 |
*/
|
|
56 |
void CCTsyAirTimeDurationFU::TestGetAirTimeDuration0001L()
|
|
57 |
{
|
|
58 |
|
|
59 |
OpenEtelServerL(EUseExtendedError);
|
|
60 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
61 |
OpenPhoneL();
|
|
62 |
|
|
63 |
TTimeIntervalSeconds time;
|
|
64 |
TInt ret(iPhone.GetAirTimeDuration(time));
|
|
65 |
ASSERT_EQUALS(KErrNotSupported, ret);
|
|
66 |
|
|
67 |
AssertMockLtsyStatusL();
|
|
68 |
CleanupStack::PopAndDestroy(this);
|
|
69 |
|
|
70 |
}
|
|
71 |
|
|
72 |
|
|
73 |
/**
|
|
74 |
@SYMTestCaseID BA-CTSY-ATD-MNATDC-0001
|
|
75 |
@SYMComponent telephony_ctsy
|
|
76 |
@SYMTestCaseDesc Test support in CTSY for RMobilePhone::NotifyAirTimeDurationChange
|
|
77 |
@SYMTestPriority High
|
|
78 |
@SYMTestActions Invokes RMobilePhone::NotifyAirTimeDurationChange
|
|
79 |
@SYMTestExpectedResults Pass
|
|
80 |
@SYMTestType CT
|
|
81 |
*/
|
|
82 |
void CCTsyAirTimeDurationFU::TestNotifyAirTimeDurationChange0001L()
|
|
83 |
{
|
|
84 |
|
|
85 |
OpenEtelServerL(EUseExtendedError);
|
|
86 |
CleanupStack::PushL(TCleanupItem(Cleanup,this));
|
|
87 |
OpenPhoneL();
|
|
88 |
|
|
89 |
TRequestStatus requestStatus;
|
|
90 |
TTimeIntervalSeconds time;
|
|
91 |
iPhone.NotifyAirTimeDurationChange(requestStatus, time);
|
|
92 |
User::WaitForRequest(requestStatus);
|
|
93 |
ASSERT_EQUALS(KErrNotSupported, requestStatus.Int());
|
|
94 |
|
|
95 |
AssertMockLtsyStatusL();
|
|
96 |
CleanupStack::PopAndDestroy(this);
|
|
97 |
|
|
98 |
}
|
|
99 |
|
|
100 |
|
|
101 |
|