Add test for MediaRouter2#getControllers
Test: atest mediaroutertest Change-Id: I5ef3d3887281751cabe5d433a080e616a695e1aa
This commit is contained in:
@@ -36,6 +36,7 @@ import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertSame;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.testng.Assert.assertThrows;
|
||||
|
||||
@@ -693,6 +694,14 @@ public class MediaRouter2Test {
|
||||
assertFalse(systemController.isReleased());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testControllers() {
|
||||
List<RoutingController> controllers = mRouter2.getControllers();
|
||||
assertNotNull(controllers);
|
||||
assertFalse(controllers.isEmpty());
|
||||
assertSame(mRouter2.getSystemController(), controllers.get(0));
|
||||
}
|
||||
|
||||
// Helper for getting routes easily
|
||||
static Map<String, MediaRoute2Info> createRouteMap(List<MediaRoute2Info> routes) {
|
||||
Map<String, MediaRoute2Info> routeMap = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user