|
1 // Copyright (c) 2005-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 // |
|
15 |
|
16 #include "Te_SimGetSubscriberIdTest.h" |
|
17 |
|
18 CSimGetSubscriberIdTest::CSimGetSubscriberIdTest() |
|
19 { |
|
20 SetTestStepName(_L("GetSubscriberIdTest")); |
|
21 } |
|
22 |
|
23 TVerdict CSimGetSubscriberIdTest::doTestStepL() |
|
24 { |
|
25 INFO_PRINTF1(_L("BeginGetSubscriberIdTest")); |
|
26 |
|
27 CreateConfigFileL(_L("c:\\config3.txt")); |
|
28 SetTestNumberL(0); |
|
29 |
|
30 TInt ret = iPhone.Open(iTelServer,KPhoneName); |
|
31 INFO_PRINTF2(_L("Result: %d"),ret); |
|
32 TESTL(ret == KErrNone); |
|
33 INFO_PRINTF1(_L("Opened phone object")); |
|
34 |
|
35 TESTL(iPhone.Initialise()==KErrNone); |
|
36 INFO_PRINTF1(_L("Opened phone object")); |
|
37 |
|
38 INFO_PRINTF1(_L("Test Retrieve Subscriber ID")); |
|
39 TRequestStatus stat0; |
|
40 RMobilePhone::TMobilePhoneSubscriberId subscriberId; |
|
41 iPhone.GetSubscriberId(stat0,subscriberId); |
|
42 User::WaitForRequest(stat0); |
|
43 TESTL(stat0==KErrNone); |
|
44 TESTL(subscriberId==KTestSubscriberId); |
|
45 CHECKPOINTL(stat0, KErrNone, CHP_NTWK_CASE("D.9")); |
|
46 |
|
47 iPhone.Close(); |
|
48 ASSERT(RThread().RequestCount()==0); |
|
49 |
|
50 return TestStepResult(); |
|
51 } |
|
52 |