Search in sources :

Example 21 with FlakyTest

use of androidx.test.filters.FlakyTest in project android_frameworks_opt_telephony by LineageOS.

the class RILTest method testSetInitialAttachApn.

@FlakyTest
@Test
public void testSetInitialAttachApn() throws Exception {
    ApnSetting apnSetting = ApnSetting.makeApnSetting(-1, "22210", "Vodafone IT", "web.omnitel.it", null, -1, null, null, -1, "", "", 0, ApnSetting.TYPE_DUN, ApnSetting.PROTOCOL_IP, ApnSetting.PROTOCOL_IP, true, 0, 0, false, 0, 0, 0, 0, -1, "");
    DataProfile dataProfile = DcTracker.createDataProfile(apnSetting, apnSetting.getProfileId(), false);
    boolean isRoaming = false;
    mRILUnderTest.setInitialAttachApn(dataProfile, isRoaming, obtainMessage());
    verify(mRadioProxy).setInitialAttachApn(mSerialNumberCaptor.capture(), eq((DataProfileInfo) invokeMethod(mRILInstance, "convertToHalDataProfile10", new Class<?>[] { DataProfile.class }, new Object[] { dataProfile })), eq(dataProfile.isPersistent()), eq(isRoaming));
    verifyRILResponse(mRILUnderTest, mSerialNumberCaptor.getValue(), RIL_REQUEST_SET_INITIAL_ATTACH_APN);
}
Also used : DataProfile(android.telephony.data.DataProfile) DataProfileInfo(android.hardware.radio.V1_0.DataProfileInfo) ApnSetting(android.telephony.data.ApnSetting) FlakyTest(androidx.test.filters.FlakyTest) FlakyTest(androidx.test.filters.FlakyTest) Test(org.junit.Test)

Example 22 with FlakyTest

use of androidx.test.filters.FlakyTest in project android_frameworks_opt_telephony by LineageOS.

the class RILTest method testGetModemActivityInfo.

@FlakyTest
@Test
public void testGetModemActivityInfo() throws Exception {
    mRILUnderTest.getModemActivityInfo(obtainMessage(), new WorkSource());
    verify(mRadioProxy).getModemActivityInfo(mSerialNumberCaptor.capture());
    verifyRILResponse(mRILUnderTest, mSerialNumberCaptor.getValue(), RIL_REQUEST_GET_ACTIVITY_INFO);
}
Also used : WorkSource(android.os.WorkSource) FlakyTest(androidx.test.filters.FlakyTest) FlakyTest(androidx.test.filters.FlakyTest) Test(org.junit.Test)

Example 23 with FlakyTest

use of androidx.test.filters.FlakyTest in project android_frameworks_opt_telephony by LineageOS.

the class RILTest method testNvWriteItem.

@FlakyTest
@Test
public void testNvWriteItem() throws Exception {
    int itemId = 1;
    String itemValue = "value";
    mRILUnderTest.nvWriteItem(itemId, itemValue, obtainMessage(), new WorkSource());
    NvWriteItem item = new NvWriteItem();
    item.itemId = itemId;
    item.value = itemValue;
    verify(mRadioProxy).nvWriteItem(mSerialNumberCaptor.capture(), eq(item));
    verifyRILResponse(mRILUnderTest, mSerialNumberCaptor.getValue(), RIL_REQUEST_NV_WRITE_ITEM);
}
Also used : NvWriteItem(android.hardware.radio.V1_0.NvWriteItem) WorkSource(android.os.WorkSource) FlakyTest(androidx.test.filters.FlakyTest) FlakyTest(androidx.test.filters.FlakyTest) Test(org.junit.Test)

Example 24 with FlakyTest

use of androidx.test.filters.FlakyTest in project android_frameworks_opt_telephony by LineageOS.

the class RILTest method testSendSMS.

@FlakyTest
@Test
public void testSendSMS() throws Exception {
    String smscPdu = "smscPdu";
    String pdu = "pdu";
    GsmSmsMessage msg = new GsmSmsMessage();
    msg.smscPdu = smscPdu;
    msg.pdu = pdu;
    mRILUnderTest.sendSMS(smscPdu, pdu, obtainMessage());
    verify(mRadioProxy).sendSms(mSerialNumberCaptor.capture(), eq(msg));
    verifyRILResponse(mRILUnderTest, mSerialNumberCaptor.getValue(), RIL_REQUEST_SEND_SMS);
}
Also used : GsmSmsMessage(android.hardware.radio.V1_0.GsmSmsMessage) FlakyTest(androidx.test.filters.FlakyTest) FlakyTest(androidx.test.filters.FlakyTest) Test(org.junit.Test)

Example 25 with FlakyTest

use of androidx.test.filters.FlakyTest in project android_frameworks_opt_telephony by LineageOS.

the class RILTest method testNvReadItem.

@FlakyTest
@Test
public void testNvReadItem() throws Exception {
    int itemId = 1;
    mRILUnderTest.nvReadItem(itemId, obtainMessage(), new WorkSource());
    verify(mRadioProxy).nvReadItem(mSerialNumberCaptor.capture(), eq(itemId));
    verifyRILResponse(mRILUnderTest, mSerialNumberCaptor.getValue(), RIL_REQUEST_NV_READ_ITEM);
}
Also used : WorkSource(android.os.WorkSource) FlakyTest(androidx.test.filters.FlakyTest) FlakyTest(androidx.test.filters.FlakyTest) Test(org.junit.Test)

Aggregations

FlakyTest (androidx.test.filters.FlakyTest)32 Test (org.junit.Test)32 SmallTest (android.test.suitebuilder.annotation.SmallTest)13 TelephonyTest (com.android.internal.telephony.TelephonyTest)13 Ignore (org.junit.Ignore)11 MediumTest (android.test.suitebuilder.annotation.MediumTest)10 Message (android.os.Message)9 WorkSource (android.os.WorkSource)9 AsyncResult (android.os.AsyncResult)6 Intent (android.content.Intent)5 DataProfile (android.telephony.data.DataProfile)5 Context (android.content.Context)4 GsmSmsMessage (android.hardware.radio.V1_0.GsmSmsMessage)4 CdmaSmsMessage (android.hardware.radio.V1_0.CdmaSmsMessage)3 ImsSmsMessage (android.hardware.radio.V1_0.ImsSmsMessage)3 ContentResolver (android.content.ContentResolver)2 DataProfileInfo (android.hardware.radio.V1_0.DataProfileInfo)2 NvWriteItem (android.hardware.radio.V1_0.NvWriteItem)2 SmsWriteArgs (android.hardware.radio.V1_0.SmsWriteArgs)2 CellIdentityCdma (android.telephony.CellIdentityCdma)2