Unit test TelephonySubscriptionSnapshot changes for VCNs.
This CL adds unit testing for TelephonySubscriptionSnapshot updates in UnderlyingNetworkTracker, Vcn, and VcnManagementService. Bug: 177364490 Test: atest FrameworksVcnTests Change-Id: I244744194a1360c7c7dee062a302e04f9b5efc32
This commit is contained in:
@@ -598,4 +598,16 @@ public class VcnManagementServiceTest {
|
||||
|
||||
mVcnMgmtSvc.getUnderlyingNetworkPolicy(new NetworkCapabilities(), new LinkProperties());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSubscriptionSnapshotUpdateNotifiesVcn() {
|
||||
mVcnMgmtSvc.setVcnConfig(TEST_UUID_2, TEST_VCN_CONFIG, TEST_PACKAGE_NAME);
|
||||
final Map<ParcelUuid, Vcn> vcnInstances = mVcnMgmtSvc.getAllVcns();
|
||||
final Vcn vcnInstance = vcnInstances.get(TEST_UUID_2);
|
||||
|
||||
TelephonySubscriptionSnapshot snapshot =
|
||||
triggerSubscriptionTrackerCbAndGetSnapshot(Collections.singleton(TEST_UUID_2));
|
||||
|
||||
verify(vcnInstance).updateSubscriptionSnapshot(eq(snapshot));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user