Search in sources :

Example 21 with InvalidAsn1DataException

use of com.android.internal.telephony.uicc.asn1.InvalidAsn1DataException in project android_frameworks_opt_telephony by LineageOS.

the class Asn1NodeTest method testAsBits_ConstructedTag.

@SmallTest
@Test(expected = IllegalStateException.class)
public void testAsBits_ConstructedTag() throws InvalidAsn1DataException {
    Asn1Node node = Asn1Node.newBuilder(0xBF37).build();
    node.asBits();
}
Also used : Asn1Node(com.android.internal.telephony.uicc.asn1.Asn1Node) SmallTest(android.test.suitebuilder.annotation.SmallTest) Test(org.junit.Test) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 22 with InvalidAsn1DataException

use of com.android.internal.telephony.uicc.asn1.InvalidAsn1DataException in project android_frameworks_opt_telephony by LineageOS.

the class Asn1NodeTest method testAsInteger_ConstructedTag.

@SmallTest
@Test(expected = IllegalStateException.class)
public void testAsInteger_ConstructedTag() throws InvalidAsn1DataException {
    Asn1Node node = Asn1Node.newBuilder(0xBF37).build();
    node.asInteger();
}
Also used : Asn1Node(com.android.internal.telephony.uicc.asn1.Asn1Node) SmallTest(android.test.suitebuilder.annotation.SmallTest) Test(org.junit.Test) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Example 23 with InvalidAsn1DataException

use of com.android.internal.telephony.uicc.asn1.InvalidAsn1DataException in project android_frameworks_opt_telephony by LineageOS.

the class Asn1NodeTest method testAsBoolean_InvalidData.

@SmallTest
@Test(expected = InvalidAsn1DataException.class)
public void testAsBoolean_InvalidData() throws TagNotFoundException, InvalidAsn1DataException {
    Asn1Node node = Asn1Node.newBuilder(0xBF37).addChildAsString(1, "1").build();
    node.getChild(1).asBoolean();
}
Also used : Asn1Node(com.android.internal.telephony.uicc.asn1.Asn1Node) SmallTest(android.test.suitebuilder.annotation.SmallTest) Test(org.junit.Test) SmallTest(android.test.suitebuilder.annotation.SmallTest)

Aggregations

Asn1Node (com.android.internal.telephony.uicc.asn1.Asn1Node)23 Test (org.junit.Test)21 SmallTest (android.test.suitebuilder.annotation.SmallTest)20 Asn1Decoder (com.android.internal.telephony.uicc.asn1.Asn1Decoder)8 InvalidAsn1DataException (com.android.internal.telephony.uicc.asn1.InvalidAsn1DataException)3 TagNotFoundException (com.android.internal.telephony.uicc.asn1.TagNotFoundException)2 Nullable (android.annotation.Nullable)1 UiccAccessRule (android.telephony.UiccAccessRule)1 TelephonyTest (com.android.internal.telephony.TelephonyTest)1