6.2.6 Class MEProfile

11.133GPPRelease 1999Test specification for Subscriber Interface Module (SIM) Application Programme Interface (API) for Java cardTS

6.2.6.1 Method check (byte index)

Test Area Reference: API_2_MEP_CHECB.

6.2.6.1.1 Conformance requirement

The method with following header shall compliant to its definition in the API.

public static boolean check(byte index)

throws ToolkitException

6.2.6.1.1.1 Normal execution

  • CRRN1: The method checks a facility in the handset profile: returns true if supported and false otherwise.

6.2.6.1.1.2 Parameters error

No requirements.

6.2.6.1.1.3 Context errors

  • CRRC1: The method shall throw ME_PROFILE_NOT_AVAILABLE ToolkitException if Terminal Profile data are not available

6.2.6.1.2 Test suite files

Specific triggering:

EVENT_STATUS_COMMAND.

No Additional requirements for the GSM personalization:

Test Script: API_2_MEP_CHECB_1.scr

Test Applet: API_2_MEP_CHECB_1.java

Load Script: API_2_MEP_CHECB_1.ldr

Cleanup Script: API_2_MEP_CHECB_1.clr

Parameter File: API_2_MEP_CHECB_1.par

6.2.6.1.3 Test procedure

Id

Description

API Expectation

APDU Expectation

1

No Terminal Profile is registered

Triggered by status command

Index = 1

ME_PROFILE_NOT_AVAILABLE ToolkitException is thrown

2

Terminal Profile, Facility is supported

index = 0

true is returned by the method

3

Terminal Profile, Facility is not supported

index = 15

false is returned by the method

6.2.6.1.4 Test Coverage

CRR number

Test case number

N1

2,3

C1

1

6.2.6.2 Method check (byte [ ] mask, short offset, short length)

Test Area Reference: API_2_MEP_CHEC_BSS

6.2.6.2.1 Conformance requirement:

The method with following header shall compliant to its definition in the API.

public static boolean check(byte[] mask,

short offset,

short length)

throws java.lang.NullPointerException,

java.lang.ArrayIndexOutOfBoundsException,

ToolkitException

6.2.6.2.1.1 Normal execution

  • CRRN1: The method checks all the facilities corresponding to bits set to 1 in the mask buffer: returns true if they are all supported and false if not.
  • CRRN2: The method returns true if the length to check is 0.

6.2.6.2.1.2 Parameters error

  • CRRP1: The method shall throw java.lang.NullPointerException if mask is null.
  • CRRP2: The method shall throw java.lang.ArrayIndexOutOfBoundsException if offset or length or both would cause access outside array bounds.
  • CRRP3: The method shall throw ME_PROFILE_NOT_AVAILABLE ToolkitException if Terminal Profile data are not available.

6.2.6.2.1.3 Context errors

No requirements.

6.2.6.2.2 Test suite files

Specific triggering:

UNFORMATTED_SMS_PP_UPD.

No Additional requirements for the GSM personalization:

Test Script: API_2_MEP_CHEC_BSS_1.scr

Test Applet: API_2_MEP_CHEC_BSS_1.java

Load Script: API_2_MEP_CHEC_BSS_1.ldr (the applet is loaded without INI after the reset (RST))

Cleanup Script: API_2_MEP_CHEC_BSS_1.clr

Parameter File: API_2_MEP_CHEC_BSS_1.par

6.2.6.2.3 Test procedure

Id

Description

API Expectation

APDU Expectation

1

No Terminal Profile is registered

Triggered by unformatted SMS

Mask = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F

Offset = 0

Length = 16

ME_PROFILE_NOT_AVAILABLE ToolkitException is thrown

2

NULL as parameter to check

mask= NULL

NullPointerException is thrown

3

Offset > mask.length

mask = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F

Offset = 17

ArrayIndexOutOfBoundsException is thrown

4

Offset < 0

mask = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F

Offset = -1

ArrayIndexOutOfBoundsException is thrown

5

Length > mask.length

mask = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F

Offset = 0

Length = 18

ArrayIndexOutOfBoundsException is thrown

6

Offset + length > mask.length

Mask = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F

Offset = 9

Length = 9

ArrayIndexOutOfBoundsException is thrown

7

length = 0

mask = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F

Offset = 0

Length = 0

true is returned

8

Check all the Terminal Profile

mask = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F

Offset = 0

Length = 16

false is returned by the method because facility 15 is not supported

9

Check a part of the Terminal Profile

mask = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F

Offset = 15

Length = 2

true is returned by the method: the 16 first facilities except facility 15 have been successfully checked

10

Check a part of the Terminal Profile

mask = 0x0080

Offset = 0

Length = 2

false is returned by the method only facility 15 is checked and not supported.

6.2.6.2.4 Test Coverage

CRR number

Test case number

N1

8,9,10

N2

7

P1

2

P2

3,4,5,6

P3

1

6.2.6.3 Method check (short index)

Test Area Reference: API_2_MEP_CHECS.

6.2.6.3.1 Conformance requirement

The method with following header shall compliant to its definition in the API.

public static boolean check(short index)

throws ToolkitException

6.2.6.3.1.1 Normal execution

  • CRRN1: The method checks a facility in the handset profile: returns true if the facility is supported, false if facility is not supported, or if facility-index outside MEProfile data.

6.2.6.3.1.2 Parameters error

No requirements.

6.2.6.3.1.3 Context errors

  • CRRC1: The method shall throw ME_PROFILE_NOT_AVAILABLE ToolkitException if Terminal Profile data are not available.

6.2.6.3.2 Test suite files

Specific triggering:

EVENT_STATUS_COMMAND.

No Additional requirements for the GSM personalization:

Test Script: API_2_MEP_CHECS_1.scr

Test Applet: API_2_MEP_CHECS_1.java

Load Script: API_2_MEP_CHECS_1.ldr

Cleanup Script: API_2_MEP_CHECS_1.clr

Parameter File: API_2_MEP_CHECS_1.par

6.2.6.3.3 Test procedure

Id

Description

API Expectation

APDU Expectation

1

No Terminal Profile is registered

Triggered by status command

index = 1

ME_PROFILE_NOT_AVAILABLE ToolkitException is thrown

2

Terminal Profile, Facility is supported

index = 0

true is returned by the method

3

Terminal Profile, Facility is not supported

index = 15

false is returned by the method

4

Facility index is outside MEProfile data

index = 0x0099

false is returned by the method

6.2.6.3.4 Test Coverage

CRR number

Test case number

N1

2,3,4

C1

1

6.2.6.4 Method getValue (short indexMSB, short indexLSB)

Test Area Reference: API_2_MEP_GVALSS.

6.2.6.4.1 Conformance requirement

The method with following header shall compliant to its definition in the API.

public static short getValue(short indexMSB, short indexLSB)

throws ToolkitException

6.2.6.4.1.1 Normal execution

  • CRRN1: The method returns the binary value of a parameter, delimited by two indexes, from the handset profile.

6.2.6.4.1.2 Parameters error

  • CRRP1: The method shall throw BAD_INPUT_PARAMETER ToolkitException if (indexMSB  indexLSB +16) or (indexMSB < indexLSB) or (indexMSB < 0) or (indexLSB < 0).

6.2.6.4.1.3 Context errors

  • CRRC1: The method shall throw ME_PROFILE_NOT_AVAILABLE ToolkitException if Terminal Profile data are not available.

6.2.6.4.2 Test suite files

Specific triggering:

EVENT_STATUS_COMMAND

No Additional requirements for the GSM personalization:

Test Script: API_2_MEP_GVALSS_1.scr

Test Applet: API_2_MEP_GVALSS_1.java

Load Script: API_2_MEP_GVALSS_1.ldr

Cleanup Script: API_2_MEP_GVALSS_1.clr

Parameter File: API_2_MEP_GVALSS_1.par

6.2.6.4.3 Test procedure

TP = FF 01 D2 F0 00 00 00 00 00 00 00 00 00 8D FF.

Id

Description

API Expectation

APDU Expectation

1

No Terminal Profile is registered

Triggered by status command

indexMSB = 15, indexLSB = 0

ME_PROFILE_NOT_AVAILABLE ToolkitException is thrown

2

Retrieve number of character down ME display in Terminal Profile which is 13

indexMSB = 108, indexLSB = 104

13 is returned by the method

3

Retrieve byte 3 and byte 4 from terminal profile.

Byte 3 = 0xD2, Byte 4 = 0xF0

indexMSB = 31, indexLSB = 16

0xF0D2 is returned by the method

4

indexMSB is negative

indexMSB = 0xFFFF, indexLSB = 0xFFFD

BAD_INPUT_PARAMETER ToolkitException is thrown

5

indexLSB is negative

indexMSB = 0x0002, indexLSB = 0xFFFD

BAD_INPUT_PARAMETER ToolkitException is thrown

6

indexMSB < indexLSB

indexMSB = 0x0002, indexLSB = 0x0003

BAD_INPUT_PARAMETER ToolkitException is thrown

7

indexMSB > indexLSB + 16

indexMSB = 0x0021, indexLSB = 0x0010

BAD_INPUT_PARAMETER ToolkitException is thrown

6.2.6.4.4 Test Coverage

CRR number

Test case number

N1

2,3

P1

4,5,6,7

C1

1

6.2.6.5 Method copy (short startOffset, byte[] dstBuffer, short dstOffset, short dstLength)

Test Area Reference: API_2_MEP_COPYS_BSS.

6.2.6.5.1 Conformance requirement

The method with following header shall compliant to its definition in the API.

public static short copy(short startOffset, byte[] dstBuffer, short dstOffset, short dstLength)

throws ToolkitException

6.2.6.5.1.1 Normal execution

  • CRRN1: The method copies a part of the handset profile in a buffer.
  • CRRN2: The method returns dstOffset + dstLength.

6.2.6.5.1.2 Parameters error

  • CRRP1: If dstBuffer is null NullPointerException is thrown.
  • CRRP2: If dstOffset or dstLength parameter is negative an ArrayIndexOutOfBoundsException exception is thrown and no copy is performed
  • CRRP3: If dstOffset+dstLength is greater than dstBuffer.length, the length of the dstBuffer array an ArrayIndexOutOfBoundsException exception is thrown and no copy is performed

6.2.6.5.1.3 Context errors

  • CRRC1: The method shall throw ME_PROFILE_NOT_AVAILABLE ToolkitException if Terminal Profile data are not available.

6.2.6.5.2 Test suite files

Specific triggering:

EVENT_STATUS_COMMAND.

No Additional requirements for the GSM personalization:

Test Script: API_2_MEP_COPYS_BSS_1.scr

Test Applet: API_2_MEP_COPYS_BSS_1.java

Load Script: API_2_MEP_COPYS_BSS_1.ldr

Cleanup Script: API_2_MEP_COPYS_BSS_1.clr

Parameter File: API_2_MEP_COPYS_BSS_1.par

6.2.6.5.3 Test procedure

TP = FF 01 D2 F0 01 02 00 00 00 00 00 00 00 8D FF.

Id

Description

API Expectation

APDU Expectation

1

No Terminal Profile is registered

Triggered by status command

startOffset = 0

dstBuffer.length = 6

dstOffset = 0

dstLength = 6

ME_PROFILE_NOT_AVAILABLE ToolkitException is thrown

2

dstBuffer is null

NullPointerException is thrown

3

dstOffset  dstBuffer.length

startOffset = 0

dstBuffer.length = 5

dstOffset = 5

dstLength = 1

ArrayIndexOutOfBoundsException is thrown

4

dstOffset < 0

startOffset = 0

dstBuffer.length = 5

dstOffset = -1

dstLength = 1

ArrayIndexOutOfBoundsException is thrown

5

dstLength < 0

startOffset = 0

dstBuffer.length = 5

dstOffset = 1

dstLength = -1

ArrayIndexOutOfBoundsException is thrown

6

dstLength >dstBuffer.length

startOffset = 0

dstBuffer.length = 5

dstOffset = 0

dstLength = 6

ArrayIndexOutOfBoundsException is thrown

7

dstOffset + dstLength >dstBuffer.length

startOffset = 0

dstBuffer.length = 5

dstOffset = 3

dstLength = 3

ArrayIndexOutOfBoundsException is thrown

8

Successful call extreme values

startOffset = 0

dstBuffer.length = 6

dstOffset = 0

dstLength = 6

Result of copy() is 6

9

Successful call any values

startOffset = 1

dstBuffer.length = 20

dstOffset = 3

dstLength = 4

Result of copy() is 7

10

Successful call, copy with length =0

startOffset = 0

dstBuffer.length = 20

dstOffset = 20

dstLength = 0

Result of copy() is 20

11

Value outside MEProfile data available

startOffset = 13

dstBuffer.length = 6

dstOffset = 0

dstLength = 6

Result of copy() is 6

6.2.6.5.4 Test Coverage

CRR number

Test case number

N1

8,9,10,11

N3

8,9,10,11

P1

2

P2

4,5

P3

3,6,7

C1

1