コード例 #1
0
 @Test
 public void onHandleIntent() throws Exception {
   menuService.onHandleIntent(null);
   ArrayList<MenuItem> menuItems = menuService.getMenuItems();
   assertNotNull(menuItems);
   assertTrue(menuItems.size() > 0);
 }
コード例 #2
0
  @Test
  public void testHasSettingsType() throws Exception {
    menuService.onHandleIntent(null);

    for (MenuItem item : menuService.getMenuItems()) {
      if ("settings".equals(item.getType())) {
        return;
      }
    }
  }
コード例 #3
0
  @Test
  public void testHasMovieType() throws Exception {
    menuService.onHandleIntent(null);

    for (MenuItem item : menuService.getMenuItems()) {
      if ("movie".equals(item.getType())) {
        return;
      }
    }
    fail("No movies were found.");
  }