use of android.telephony.ModemInfo in project android_frameworks_opt_telephony by LineageOS.
the class PhoneCapabilityTest method basicTests.
@Test
@SmallTest
public void basicTests() throws Exception {
int maxActiveVoiceCalls = 1;
int maxActiveData = 2;
int max5G = 3;
ModemInfo modemInfo = new ModemInfo(1, 2, true, false);
List<ModemInfo> logicalModemList = new ArrayList<>();
logicalModemList.add(modemInfo);
PhoneCapability capability = new PhoneCapability(maxActiveVoiceCalls, maxActiveData, max5G, logicalModemList, false);
assertEquals(maxActiveVoiceCalls, capability.maxActiveVoiceCalls);
assertEquals(maxActiveData, capability.maxActiveData);
assertEquals(max5G, capability.max5G);
assertEquals(1, capability.logicalModemList.size());
assertEquals(modemInfo, capability.logicalModemList.get(0));
PhoneCapability toCompare = new PhoneCapability(maxActiveVoiceCalls + 1, maxActiveData - 1, max5G, logicalModemList, false);
assertEquals(capability, new PhoneCapability(maxActiveVoiceCalls, maxActiveData, max5G, logicalModemList, false));
assertNotEquals(capability, toCompare);
}