Newer
Older
//-----------------------------------------------------------------------------
// Package Definition
// Test Area: CAT Runtime Environment Applet Triggering
// EVENT_PROACTIVE_HANDLER_AVAILABLE
//-----------------------------------------------------------------------------
package uicc.test.catre.cre_apt_epha;
//-----------------------------------------------------------------------------
// Imports
//-----------------------------------------------------------------------------
import org.etsi.scp.wg3.uicc.jcapi.userclass.*;
import org.etsi.scp.wg3.uicc.jcapi.userinterface.*;
public class Test_Cre_Apt_Epha extends UiccTestModel {
static final String CAP_FILE_PATH = "uicc/test/catre/cre_apt_epha";
static final String CLASS_AID_1 = "A0000000 090005FF FFFFFF89 50010001";
static final String CLASS_AID_2 = "A0000000 090005FF FFFFFF89 50020001";
static final String APPLET_AID_1 = "A0000000 090005FF FFFFFF89 50010102";
static final String APPLET_AID_2 = "A0000000 090005FF FFFFFF89 50020102";
static final String Text1 = "54657874 31";
private UiccAPITestCardService test;
APDUResponse response;
public Test_Cre_Apt_Epha() {
test = UiccAPITestCardService.getTheUiccTestCardService();
}
public boolean run() {
/*********************************************************************/
/*********************************************************************/
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// start test
test.reset();
test.terminalProfileSession(UiccCardManagementService.DEFAULT_TERMINAL_PROFILE);
// install package and applets
test.loadPackage(CAP_FILE_PATH);
test.installApplet(CAP_FILE_PATH, CLASS_AID_1, APPLET_AID_1,
"800A"+ // TLV UICC Toolkit application specific parameters
"01" + // V Priority Level
"00" + // V Max. number of timers
"0A" + // V Maximum text length for a menu entry
"01" + // V Maximum number of menu entries
"01" + // V Position of the first menu entry
"01" + // V Identifier of the first menu entry
"00" + // V Maximum number of channels
"00" + // LV Minimum Security Level field
"00" + // LV TAR Value(s)
"00"); // V Maximum number of services
test.installApplet(CAP_FILE_PATH, CLASS_AID_2, APPLET_AID_2,
"800A"+ // TLV UICC Toolkit application specific parameters
"02" + // V Priority Level
"00" + // V Max. number of timers
"0A" + // V Maximum text length for a menu entry
"01" + // V Maximum number of menu entries
"02" + // V Position of the first menu entry
"02" + // V Identifier of the first menu entry
"00" + // V Maximum number of channels
"00" + // LV Minimum Security Level field
"00" + // LV TAR Value(s)
"00"); // V Maximum number of services
// test script
test.reset();
test.terminalProfileSession("09030100");
//***TEST CASE 1: 1-APPLET 1 IS TRIGGERED***
response = test.envelopeMenuSelection("100101", "");//Help Request not available
//***TEST CASE 1: 4-APPLET 1 IS TRIGGERED***
test.envelopeEventDownloadUserActivity();
//***TEST CASE 2: 1-APPLET 1 IS TRIGGERED***
response = test.envelopeMenuSelection("100101", "");//Help Request not available
addResult(response.checkData("D0118103 01218082 0281028D 0604"+Text1));
//***TEST CASE 2: 3-APPLET 2 IS TRIGGERED***
test.envelopeMenuSelection("100102", "");//Help Request not available
test.reset();
test.terminalProfileSession("09030100");
// check results
response = test.selectApplication(APPLET_AID_1);
addResult(response.checkData("10"+APPLET_AID_1+"0CCCCCCC CCCCCCCC CCCCCCCC CC"));
addResult(response.checkData("10"+APPLET_AID_2+"07CCCCCC CCCCCCCC"));
// delete applet and package
test.reset();
test.terminalProfileSession(UiccCardManagementService.DEFAULT_TERMINAL_PROFILE);
test.deleteApplet(APPLET_AID_1);
test.deleteApplet(APPLET_AID_2);
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
// commented out Testcase 3, because envelopeEventProactiveHandlerAvailable() is currently FFS
// /*********************************************************************/
// /** Testcase 3 */
// /*********************************************************************/
//
// // Install Applet1
// response = test.installApplet(CAP_FILE_PATH, CLASS_AID_1, APPLET_AID_1,
// "8008" + // TLV UICC Toolkit application specific parameters
// "01" + // V Priority Level
// "00" + // V Max. number of timers
// "0A" + // V Maximum text length for a menu entry
// "00" + // V Maximum number of menu entries
// "00" + // V Maximum number of channels
// "00" + // LV Minimum Security Level field
// "00" + // LV TAR Value(s)
// "00"); // V Maximum number of services
//
// test.addResult(response.checkSw("9000"));
//
// // Install Applet2
// response = test.installApplet(CAP_FILE_PATH, CLASS_AID_2, APPLET_AID_2,
// "8008" + // TLV UICC Toolkit application specific parameters
// "01" + // V Priority Level
// "00" + // V Max. number of timers
// "0A" + // V Maximum text length for a menu entry
// "00" + // V Maximum number of menu entries
// "00" + // V Maximum number of channels
// "00" + // LV Minimum Security Level field
// "00" + // LV TAR Value(s)
// "00"); // V Maximum number of services
//
// addResult(response.checkSw("9000"));
//
// // Card Initialisation
// test.reset();
// test.terminalProfileSession("09030020 21");
//
// // Trigger the applets
// response = test.envelopeEventProactiveHandlerAvailable();
// addResult(response.checkSw("9000"));
//
//
// /*********************************************************************/
// /*********************************************************************/
// /** Check Applets */
// /*********************************************************************/
// /*********************************************************************/
//
// response = test.selectApplication(APPLET_AID_1);
// addResult(response.checkData("10" + APPLET_AID_1 + "01" + "CC"));
//
//
// /*********************************************************************/
// /*********************************************************************/
// /** Restore card */
// /*********************************************************************/
// /*********************************************************************/
//
// test.reset();
// test.terminalProfileSession(UiccCardManagementService.DEFAULT_TERMINAL_PROFILE);
// // delete applets and package
// test.deleteApplet(APPLET_AID_1);
// test.deleteApplet(APPLET_AID_2);
test.deletePackage(CAP_FILE_PATH);