use of android.telephony.PhysicalChannelConfig.Builder in project android_frameworks_opt_telephony by LineageOS.
the class PhysicalChannelConfigTest method testParcel.
@Test
public void testParcel() {
PhysicalChannelConfig config = new Builder().setRat(RAT).setCellConnectionStatus(CONNECTION_STATUS).setCellBandwidthDownlinkKhz(CELL_BANDWIDTH).setFrequencyRange(FREQUENCY_RANGE).setChannelNumber(CHANNEL_NUMBER).setContextIds(CONTEXT_IDS).setPhysicalCellId(PHYSICAL_CELL_ID).build();
Parcel parcel = Parcel.obtain();
config.writeToParcel(parcel, 0);
parcel.setDataPosition(0);
PhysicalChannelConfig fromParcel = PhysicalChannelConfig.CREATOR.createFromParcel(parcel);
assertThat(fromParcel).isEqualTo(config);
}
use of android.telephony.PhysicalChannelConfig.Builder in project android_frameworks_opt_telephony by LineageOS.
the class PhysicalChannelConfigTest method testBuilder.
@Test
public void testBuilder() {
PhysicalChannelConfig config = new Builder().setRat(RAT).setCellConnectionStatus(CONNECTION_STATUS).setCellBandwidthDownlinkKhz(CELL_BANDWIDTH).setFrequencyRange(FREQUENCY_RANGE).setChannelNumber(CHANNEL_NUMBER).setContextIds(CONTEXT_IDS).setPhysicalCellId(PHYSICAL_CELL_ID).build();
assertThat(config.getRat()).isEqualTo(RAT);
assertThat(config.getConnectionStatus()).isEqualTo(CONNECTION_STATUS);
assertThat(config.getCellBandwidthDownlink()).isEqualTo(CELL_BANDWIDTH);
assertThat(config.getFrequencyRange()).isEqualTo(FREQUENCY_RANGE);
assertThat(config.getChannelNumber()).isEqualTo(CHANNEL_NUMBER);
assertThat(config.getContextIds()).isEqualTo(CONTEXT_IDS);
assertThat(config.getPhysicalCellId()).isEqualTo(PHYSICAL_CELL_ID);
}
Aggregations